Question: Hello, I have this lab for my Java class and need help. Thank you. You have to write a new program that calculates the miles

Hello, I have this lab for my Java class and need help. Thank you.
You have to write a new program that calculates the miles per gallon and cost of driving one mile for each of the different types of cars. The student will use strings, variables, assignment statements, output statements to communicate with the user. The project (named Lastname_L01) should have appropriate variables. The program declares and assigns realistic values to appropriate variables for five types of cars (1) sedan (2) coupe (3) sports (4) suv (5) van. The program should print the variable values and output in a nice tablulated format. For each vehicle type assign the following values (you can give your own different realistic values) for (a) miles driven (b) Gallons used (c) cost per gallon. Then for each car type compute the miles per gallon and the cost of driving one mile. For example, For Sedan: SedanMiles Driven = 100, SedanGallonsUsed = 7, SedanCostPerGallon = $2.45. Using these values compute Sedan MilesPerGallon and SedanCostPerMile. Print all values in a neatly tabulated form
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
