Question: in java code Create each of the following classes in the com.javaoo.calculators package: a. BasicCalculator b. ScientificCalculator C. Trigonometric Calculator Individually Licensed to Trey Williams

in java code  in java code Create each of the following classes in the
com.javaoo.calculators package: a. BasicCalculator b. ScientificCalculator C. Trigonometric Calculator Individually Licensed to
Trey Williams kercise 2: Adding Attributes and Methods For each of the
calculator classes, add the necessary attributes and methods as specified below. BasicCalculator:

Create each of the following classes in the com.javaoo.calculators package: a. BasicCalculator b. ScientificCalculator C. Trigonometric Calculator Individually Licensed to Trey Williams kercise 2: Adding Attributes and Methods For each of the calculator classes, add the necessary attributes and methods as specified below. BasicCalculator: a. Declare the following public methods i. add() ii. subtract() iii. multiply () iv. divide () b. Each method must accept two parameters, both of type double c. Each method must return a double. Add code to the return statement that calculates and returns the correct value. Example: public final double multiply (double x, double y) { return x * y; Scientific Calculator: d. Must declare the following attributes: i. A double named PI to hold the value of PI (3.14159). This attribute will be shared by all instances of the class and will be constant so it should be declared as static and final. Since it is a final, it can have public visibility so that anyone can use it. ii. A double named holdvalue to hold a value in memory. Since it will be managed within the ScientificCalculator class, it should have private visibility. ii. e. Declare the following public methods i. exp() which has one parameter of type double and returns a double This method will be used to calculate ex] log() which has one parameter of type double and returns a double [This method will be used to calculate in x] iii. putValueInMemory () which has one parameter of type double and returns a void. Implement this method. iv. getValue FromMemory () which has no parameters and returns a double Implement this method TrigonometricCalculator: g. Declare the following public methods i. sine () ii. cosine () iii. tangent () iv. arcsine () v. arccosine () vi. arctangent () h. Each metod must accept one parameter of type double . Each method must return a double j. We will not provide the details of each method in this lab. For your code to compile, add the following single statement to each method block: return(0)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!