12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
-
- /**
- * Write a description of class ScientificOperations here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class ScientificOperations
- {
- // instance variables - replace the example below with your own
- private int x;
-
- /**
- * Constructor for objects of class ScientificOperations
- */
- public ScientificOperations()
- {
- // initialise instance variables
- x = 0;
- }
-
- public static double product(double a,double b)
- { return a*b;
- }
- public static double Exponent(double a,double b)
- {
- return Math.pow(a,b);
-
- }
- public static double Inverse(int x)
- {
- double val=(double)x;
- return 1/val;
- }
- public static double ScientificSin(int x)
- {
- double val=Math.sin((double)x);
- return val;
-
- }
- public static double ScientificCosin(int x)
- {
- double val=Math.cos((double)x);
- return val;
- }
- public static double ScientificTan(int x)
- {
- double val=Math.tan((double)x);
- return val;
- }
- public static double InverseSin(int x)
- {
- double val=Math.asin((double)x);
- return val;
-
- }
- public static double InverseCos(int x)
- {
- double val=Math.acos((double)x);
- return val;
- }
- public static double add(double x,double y)
- {
- return x+y;
- }
- public static double sub(double x,double y)
- { return x-y;
- }
- }
|