Question: Road Trip Calculator in C# . Please use stuff a beginner would understand You and your best friend are going on a roadtrip during the

Road Trip Calculator in C#. Please use stuff a beginner would understand
You and your best friend are going on a roadtrip during the fall break, and as financially responsible adults, are creating a budget for your estimated costs. Eager to put your new programming skills to work, you decide to create a program to do the calculations for you.
Requirements
The program will need to prompt the user for several inputs, namely: the total distance of the trip in whole kilometers whether you'll travel in their vehicle or yours
Your vehicle has a fuel efficiency of 11.9 L per 100 km and your best friend's vehicle has a fuel effiency of 8.7 L per 100 km .
The program will need to simulate the price of gas for this trip. Generate a random value between $1.40 and $2 to simulate the cost of 1 L of fuel. The simulated price only needs to be generated once during the program's execution. NOTE: For testing purposes, you may
set the cost to a fixed amount. Ensure your final submission makes use of the generated value.
Finally, your program should account for the cost of coffee and road snacks, which you estimate will be as follows:
For example, let's say you input a trip of 800km driving your vehicle, and the simulated gas price was $1.80 per L.
Your vehicle requires 11.9 L per hundred km, which means this trip will use 95.2 L of fuel.
95.2 L of fuel at $1.80 per L will cost $171.36.
You will spend $80 on snacks.
The total cost will be $171.36+$80=$251.36.
The program must display all the calculated results to the user, then ask if they'd like to perform another calculation. The program must allow the user to submit multiple trips, ending only when the user chooses to end the program. The program must also not crash or abnormally terminate due to any user input or internal processing; display appropriate
error messages and recover from any errors gracefully.
Coding Requirements
A C# comment block at the beginning of the source file describing the purpose,
author, and last modified date of the program
Write only one statement per line
Use camelCase for local variable names
Use TitleCase for any constant variable names
Use defensive programming where necessary
Ensure graceful handling of exceptions
Road Trip Calculator in C# . Please use stuff a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!