Question: Write a java program as in the next class diagram, such as: SimpleCalc2() method only calls find method. find() method: asks the user to
Write a java program as in the next class diagram, such as: SimpleCalc2() method only calls find method. find() method: asks the user to enter two numbers and a math operation like(+,-"./) and prints the result like (inputs and outputs only) SimpleCalc2 - X: double + y: double + getX(): double Enter no1: 4 Enter nol: 5 Enter nol: 5 + setX[double x): void Enter no2: 7 Enter no2: 7 Enter no2: 7 + SimpleCalc2() + find () : void + advanced(String s): void Enter operation; * Enter operation: + Enter operation: - 4*7=28 5+7=12 4-9=-5 advanced(..) Let the user enter a whole line like (5+8) and analyse it, then prints result
Step by Step Solution
3.26 Rating (152 Votes )
There are 3 Steps involved in it
The code is Java is as follows Kindly refer the comments for understanding import javaio import java... View full answer
Get step-by-step solutions from verified subject matter experts
