The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Hey! I have Project that I'm trying to get turned in on Friday for extra points y midnight but if not then by Saturday morning. I have to build an object using 5 different type of math formulas excluding adding, subtracting, multiplying and dividing. Then I need to create another program that uses the first. I'll attach what I have so far for the first. Disregard the last about using a previous program I am going to try and do that after getting help with the first programs.
Here is the full length directions given:
Several weeks ago we found some “cool” tools in the Java Math Class. But perhaps you thought, “maybe there should be more?” Project "Mathey" will create a new class of those components you felt might be missing (plus a few more).
In your new Mathey class, you will write AT LEAST 5 methods to calculate some sort of mathematical procedure that isn’t a common operation (+, -, /, *, %). Then, you will write AT LEAST two more using method overloading that conducts the same mathematical procedure as one of the first 5, but contains different parameters.
You need to provide the basic instructions for using the methods you choose to include in your project for the user such as an API. These instructions should be included in very details comments throughout your Mathey class.
Once your Mathey class has been written, you must be creative and write a program that uses all of your methods within the same program. You can be creative with your program and write it about anything, but it must use all of the Mathey methods. In addition to your regular documentation and output in your submitted program, you must include the full instructions for what the program does in your comments.
After you have tested your Mathey class with your new program, you must choose one of your previous programs and tweak the code to remove any Math class references and replace them with your new Mathey class references. You can choose any of your previous programs in which you originally used the Math class. Some possible recent ones include Heron’s Formula, Perfect Integers, isPrime, etc.
Just to review, you will submit the following:
public class Mathey {public double squareRoot(double n) {return Math.sqrt(n);}public double reciprocal(double n) {return 1.0/n;}public double power(double n, int p) {return Math.pow(n, p);}public double power(double n, double p) {return Math.pow(n, p);}public double cubeRoot(double n) {return Math.pow(n, (1.0/3.0));}public double sine(double n) {return Math.sin(n);}public double sine(int n) {return Math.sin(n);}}
-----------