Question: Write an application that prompts the user for two integers and then prompts the user to enter an option as follows: a. add the
Write an application that prompts the user for two integers and then prompts the user to enter an option as follows: a. add the two integers, b. subtract the second integer from the first, c. multiply the integers, and d. divide the first integer by the second, Create methods for each of the option; two of the methods must be of void and other two methods must be returning the value to main program. Display an error message if the user enters an option other than 1 through 4. Call each methods based on operation that selected. Name your class mycalculator. (20 marks)
Step by Step Solution
3.45 Rating (165 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
