Question
Java: This class executes statements, stores assignments, and displays results evaluations. It is made up of: - 3 variables: * two of double types (one
Java:
This class executes statements, stores assignments, and displays results
evaluations. It is made up of:
- 3 variables:
* two of double types (one and two) for the operands
* one of type String (opp) for the operation;
- a constructor without arguments.
- methods :
* void operation (String str): called by the following methods as appropriate.
It must memorize the value of the 1st operand and make the initializations
necessary for the second and opp (Binary or unary operator of a
expression).
void add (); // addition
void subtract (); //substraction
void multiply (); // multiplication
void divide (); // division
void factorial (); // factorial of a number (real)
void pow (); //power
void rootSquare (); // square root of a number
void nepLog (); // natural logarithm
* void compute (); / * for evaluation when you press the = key
(performs the operation according to the value of Op) * /
* void clear (); // reset when you press the C key
* double display (); // return the 2nd operand
* Other methods and / or variables if necessary
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started