Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java How To Program Late Objects Version

Authors: Paul Deitel, Deitel & Associates

8th Edition

0136123716, 9780136123712

More Books

Students also viewed these Programming questions

Question

Find the 50th derivative of y = cos 2x.

Answered: 1 week ago