Question: I need to create a class call ParabolaApp Class Display this menu: Parabola Calculations Menu 1. Find y for a given x 2. Find the
I need to create a class call ParabolaApp Class
Display this menu:
Parabola Calculations Menu
1. Find y for a given x 2. Find the slope of the tangent line at a given x 3. Calculate area estimate 4. Exit the program
Enter your choice:
Keep the user within the menu system until they choose to exit, i.e., they can do more than activity while they are there. If the user enters an integer outside the range of valid menu choices or an invalid data type, tell them theyve made an error. More details about the menu choices:
-
Ask the user for an x coordinate, then report to them the corresponding y value.
-
Ask the user for an x coordinate, then report to them the slope of the tangent line.
-
Ask the user how many rectangles to use, then report to them the calculated area and how far off the
calculation is from the actual.
-
Exits gracefully (not artificially) from the program (i.e., a loop should end, you shouldnt forcible
terminate the program or break out of the loop).
-
This main class should contain all user communication, consisting of console display and user input via the Scanner class. This class is a client of calculation functions from the ParabolaCalc class.
-
This class should have a main method.
-
You may define class constants, but no other class-level variables.
-
Implement generic (not problem-specific) functions to get in-range integers and floating-point values
from the user. Pass in the expected minimum and maximum; the functions should ensure the user makes an entry in the specified range and using the right data type (using Scanner look-ahead) and then passes back the users choice. Youll make of use of such functions in later projects.
-
Create only one Scanner object instance. If you dont understand why, think and ask! Its a common misconception that more are needed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
