subject

Write a OOPCalculator class, by giving it proper states and behaviors. For example, you can have menuChoice, firstFloat, secondFloat as member variables. You can give it behaviors like, askCalcChoice, askTwoValues, displayResults to get the choice from users, to get the numbers and display the calculation results respectively. All of the code written for calculation needs to be properly placed within these methods of the OOPCalculator class. For example: askCalcChoice first displays the menu, prompts the user to input the choice, and then waits until user presses enter. Once a valid input is entered, it returns the choice (between 1 to 5 or A for addition, S for subtraction, M for multiplication, D for division or X for exit). Similarly, other methods will implement rest of the behaviors. The users of your OOPCaluclator class do not need to know internal details of how you have implemented your behaviors. These are the only public interface exposed to the users, rest of the details stays with OOPCalculator class.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, micahpauleen748
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, alannaamarriee
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
You know the right answer?
Write a OOPCalculator class, by giving it proper states and behaviors. For example, you can have men...

Questions in other subjects: