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

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!