Question: 1.3. Write a simple calculator program in Java to perform addition (+), subtraction (-), multiplication (*) or division (). Consider the following: (50%) a.

1.3. Write a simple calculator program in Java to perform addition (+), subtraction (-), multiplication (*) or division (\). Consider the following: (50%) a. The program should read three values: the first number, the second number and option number representing one of the athematic operations, a user should get the following message run: Enter The First Number: 10 Enter The Second Number: 20 Enter Option: 1. For Addition 2. For Subtraction 3. For Multiplication 4. For Division 3 result-200 BUILD SUCCESSFUL (total time: 6 seconds) (10%) b. Use switch statement, the default in the switch expression is a message stating wrong number (30%) c. The program should then print the result, If the second number is zero, and user chooses division option, the result should be zero only, for example run: Enter The First Number: 10 Enter The Second Number: 0 Enter Option: 1. For Addition 2. For Subtraction 3. For Multiplication 4. For Division 4 result-0 BUILD SUCCESSFUL (total time: 6 seconds) (10%)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
