/** * Write a description of class simpleOp here. * * @author (your name) * @version (a version number or a date) */ import java.util.*; public class simpleOp { public static double currentNumber = 0; public static double add(double x, double y){ //CALULATES THE SUM OF TWO NUMBERS currentNumber = x + y; //System.out.println(currentNumber); return currentNumber; } public static double sub(double x, double y){ //CALULATES THE DIFFERENCE OF TWO NUMBERS currentNumber = x - y; //System.out.println(currentNumber); return currentNumber; } public static double mul(double x, double y){ //CALULATES THE PRODUCT OF TWO NUMBERS currentNumber = x * y; //System.out.println(currentNumber); return currentNumber; } public static double div(double x, double y){ //CALULATES THE QUOTIENT OF TWO NUMBERS currentNumber = x / y; //System.out.println(currentNumber); return currentNumber; } public static double squ(double x){ //CALULATES THE SQUARE OF ONE NUMBER //CASTED TO double FOR NOW... IT'S IN ALPHA, YOU DIG? currentNumber = (int) Math.pow(x,2); //System.out.println(currentNumber); return currentNumber; } public static double sqrt(double x){ //CALULATES THE SQUARE ROOT OF ONE NUMBER //CASTED TO double FOR NOW... IT'S IN ALPHA, YOU DIG? currentNumber = (int) Math.sqrt(x); //System.out.println(currentNumber); return currentNumber; } public static double exp(double x, double y){ //CALULATES EXPONENTIATION OF X TO POWER OF Y //CASTED TO double FOR NOW... IT'S IN ALPHA, YOU DIG? currentNumber = (int) Math.pow(x,y); //System.out.println(currentNumber); return currentNumber; } public static double inv(double x){ //CALULATES THE INVERSE OF NUMBER //CASTED TO double FOR NOW... IT'S IN ALPHA, YOU DIG? currentNumber = (1/x); //System.out.println(currentNumber); return currentNumber; } public static double invert(double x){ //TURNS NEGATIVE TO POSITIVE OR POSITIVE TO NEGATIVE currentNumber = -x; //System.out.println(currentNumber); return currentNumber; } }