Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using java with comments Write a program that will simulate the following tasks of a calculator. 1. Call a method to display a menu, giving

using java with comments

image text in transcribed

Write a program that will simulate the following tasks of a calculator. 1. Call a method to display a menu, giving the user the choice of typing in any one of the following: 1 add 2 subtract 3 divide 4 multiply 5 average of two numbers 6 maximum of two numbers Note: You must calculate the max two ways and print both results 1. without calling the Math.max() method. 2. calling the Math.max() method. 2. Ask the user to enter the number of the operation: 3. Read the user's response into a variable. 4. Ask the user for 2 double values 5. Use a chained if else to calculate the result(s) of using that specific operation. Print the original values and the result(s) to 2 decimal places. . 6. Modify your program so that the user can enter 5 different sets of values and calculate using a different operation each time. (i.e. add a for loop.) 7. Once your program is running correctly, send the output to a file. 8. Submit the program file with the output, trace, and handcheck for the max of 25.2 and 45.8. Also submit the corresponding output file

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

1. What is nonverbal communication?

Answered: 1 week ago