123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
-
- /**
- * Write a description of class Calculator here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class Calculator
-
- {
- public static double add(double x, double y) {
- double result = x+y;
- return result;
- }
-
- public static double subtract(double x, double y) {
- double result = x-y;
- return result;
- }
-
- public static double multiply(double x, double y) {
- double result = x*y;
- return result;
- }
-
- public static double divide(double x, double y) {
- double result = x/y;
- return result;
- }
-
- public static double square(double x) {
- double result = Math.pow(x, 2);
- return result;
- }
-
- public static double inverse(double x) {
- double result = x;
- return result;
- }
-
- public static double tangent(double x) {
- double result = Math.tan(x);
- return result;
- }
-
- public static double itan(double x) {
- double result = Math.atan(x);
- return result;
- }
- }
|