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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started