Question: Create a Java program that has a main() function. There will be four math functions/methods. The math functions/methods are: 1. Calculate the Pythagorean Theorem .

Create a Java program that has a main() function. There will be four math functions/methods. The math functions/methods are:

1. Calculate the Pythagorean Theorem .

2. Calculate the Quadratic Formula.

3. Calculate the Distance Formula.

4. Calculate the Slope of a Line.

All four math functions/methods and the main() will be in the same class .

Inside the main():

a. Display a menu that shows the four functions this program performs.

b. Have a fifth menu option that allows the user to exit the program.

c. The main function shall validate the input.

d. If Exit is chosen, the program will end.

e. If one of the four calculations is chosen, go to that method/functions and perform the calculation.

f. After performing that calculation, cycle back, display the menu, and ask the user to make another selection.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!