Question
JAVA Help Create a do - while loop / with switch case statements that operate the program. You will have multi-level menu operation using do-while
JAVA Help
Create a do-while loop / with switch case statements that operate the program.
You will have multi-level menu operation using do-while implementation.
Present the user with a menu and options. Based upon the options selected by the user the program should operate correctly. You will need nested menus of some sort.
Create a computer program that will calculate the range for 3 different vehicles.
The program should create a programmer created class, where 3 int class/instance variables are created passengers, fuel capacity, mpg.
Set-up the program so the user can manually input the values for passengers, fuel capacity, mpg for the 3 created vehicles.
Use programming conventions void set() methods to set values, return get() methods to return values.
Think about where in the program in object creation will take place.
range = fuel capacity * miles per gallon.
Each Vehicle type should have unique values for number of passengers, fuel capacity, and miles per gallon.
Attach Snipping photos as the program operates, including menu prompts, outputs etc.
Please create White Boarding or Pseudo Code for you program design.
Sample Output: // Create similar output for 3 Vehicle Types
On next page-
Change input values now that we are creating the same program multiple times.
**************************************
* Main Menu: *
* Enter # to run program or Quit *
* 1) Minivan *
* 2) Hybrid *
* 3) Sports Car *
* 4) Quit *
**************************************
1
You Selected Option 1:
Minivan
**************************************
* Minivan Main Menu: *
* Enter # to run program or Quit *
* 1) Enter Fuel Capacity *
* 2) Enter Miles Per Gallon *
* 3) Calculate Range *
* 4) Return To Main Menu *
**************************************
You Selected Option 1:
Enter fuel capacity in Integers Please
15
You entered: 15
**************************************
* Minivan Menu: *
* Enter # to run program or Quit *
* 1) Minivan *
* 2) Enter Miles Per Gallon *
* 3) Calculate Range *
* 4) Return To Main Menu *
**************************************
You Selected Option 2:
Enter Miles Per Gallon in Integers Please
30
You entered: 30
**************************************
* Minivan Menu: *
* Enter # to run program or Quit *
* 1) Minivan *
* 2) Enter Miles Per Gallon *
* 3) Calculate Range *
* 4) Return To Main Menu *
**************************************
You Selected Option 3:
Range = 450
**************************************
* Minivan Menu: *
* Enter # to run program or Quit *
* 1) Minivan *
* 2) Enter Miles Per Gallon *
* 3) Calculate Range *
* 4) Return To Main Menu *
**************************************
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