Question: Project Name: Chpt2_Project Class Name: Chpt2_Project Write a Java program that computes total distance traveled by a car. Step 1. Create an algorithm for the
Project Name: Chpt2_Project
Class Name: Chpt2_Project
Write a Java program that computes total distance traveled by a car.
Step 1. Create an algorithm for the program (either a flowchart or pseudocode). You will have to submit the algorithm so make sure it is legible if drawn by hand.
Step 2. Create a program in Eclipse that does the following.
Inputs: The program must prompt the user to enter two inputs: 1) how many gallons the gas tank will hold; and 2) the gas mileage, i.e. miles per gallon, the car gets.
Enter how many gallons the gas tank holds (must be less than 25):
Enter the miles per gallon the car gets (must be less than 30 MPG):
Output: The program should have this output (below is an example):
The maximum distance the car can travel is:
Test data: Use the following data to test your program:
The car has a 22-gallon gas tank and gets 27 miles to the gallon.

R Problems @ Javadoc Ea Declaration.Console X. Data Hierarchy terminated> C2 Project JavaApplication]CAP grS File Javay e1.80-14 binjavaw exe (Oct 18, 2017, 12:49:58 PM) Enter how many gallons the gas tak Enter the miles per gallon the must be less than 25): 22 s (must be less than 30 MPG): 27 The maximum distance the travel is: 594
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
