Travel and Mileage Program
NOTE – IMPORTANT:
- Only use C++ functions we studied in theclass.
- You can email or call me with questions “about” theassignment.
INSTRUCTIONS:
Plan your program before starting. Point distribution is asfollows:
- Clean coding, “Logical Logic” and appropriate (not every line)commenting of the code: 20 points
- User’s ease of use of the program e.g. Instructions for theprogram, data input requests during execution of the program in amanner that makes the user easily understand what kind of data theyneed to enter etc. : 20 points
- Accuracy of calculations and use of appropriate C++functions/control structure statements: 20 points
- Display of data at the end of the program after calculation -presentation: 30 points
ASSIGNMENT:
Write a C++ program that performs following and formattedresults:
- The output should show heading of Travel and MileageProgram.
- Users should be able to enter one car type and details aboutthe car – programmer should decide what details are appropriatebased on the discussion in the class (out of four possible carsthat your program can do calculations for).
- Users should be able to input Travel Start and Enddestinations.
- Users should be able to enter the total distance in milesbetween the start and end destination.
- Based on the user’s input, display following:
- Appropriate heading for the program with formatting usingsetfill().
- Display travel start and end destinations, Total distance to betraveled in miles and kilometers and other details for the vehicleto be used for the travel in more than one columns usingsetw().
- Display Total Gallons of fuel required to travel from start toend destination based on the data you researched about the fourcars using control structure (if/else/else if) statements from C++.Formula for calculation is: Gallons of Fuel Required =Vehicle_Milage_Per_Gallon X Total_Number_of Miles
USE YOUR IMAGINATION AND CREATIVITY TO DISPLAY THE DATA INPRESENTABLE, READABLE AND USEFUL MANNER!!
Expert Answer
Answer to Travel and Mileage Program NOTE – IMPORTANT: Only use C++ functions we studied in the class. You can email or call me wi…