Answered step by step
Verified Expert Solution
Question
1 Approved Answer
n this lab you ll be building a tool to allow people to compare their vehicles. So , basically, assume a family has multiple vehicles
n this lab youll be building a tool to allow people to compare their vehicles. So basically,
assume a family has multiple vehicles theyre able to use and theyre trying to decide which
vehicle would be best to use on a road trip.
Your job is to create a program that takes in how many miles their trip is supposed to be and the
average gas price of their journey. You should then ask how many vehicles theyd like to
compare. While looping, ask the names make and model of each vehicle and their gas
mileage and tank capacity. After receiving the information, calculate how many tanks of gas it
would take for each vehicle and what the projected price would be for the journey. Display this
information to the user.
Your price should be based on how much it is to fill up a full tank on each individual vehicle.
You shouldnt just calculate how many gallons that car would need and then calculate that cost.
You also cannot have PARTIAL tanks. If its tanks, you should display tanks and calculate
it for tanks.
Finally, at the end of the program, you should display the best name cost of the car based on
the calculations.
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