123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * Write a description of class Core here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class Core
  8. {
  9. /**
  10. * Constructor for objects of class Core
  11. */
  12. public Core()
  13. {
  14. }
  15. public static double add(double x, double y)
  16. {
  17. return x + y;
  18. }
  19. public static double subtract(double x, double y)
  20. {
  21. return x - y;
  22. }
  23. public static double divide(double x, double y)
  24. {
  25. return x / y;
  26. }
  27. public static double multiply(double x, double y)
  28. {
  29. return x * y;
  30. }
  31. public static double squareRoot(double x)
  32. {
  33. return Math.sqrt(x);
  34. }
  35. public static double exponentiation(double x, double y)
  36. {
  37. return Math.pow(x, y);
  38. }
  39. public static double inverse(double x)
  40. {
  41. return 1 / x;
  42. }
  43. public static double reverse(double x)
  44. {
  45. return -1*x;
  46. }
  47. }