CustomFeatures.java 375B

123456789101112131415161718192021
  1. /**
  2. * Write a description of class CustomFeatures here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class CustomFeatures
  8. {
  9. public double cubeRoot(double x)
  10. {
  11. return Math.pow(x,1.0/3.0);
  12. }
  13. public double root(double x)
  14. {
  15. double y = Console.getDoubleInput();
  16. return Math.pow(x,1.0/y);
  17. }
  18. }