Question
Objective In this assignment, you will perform two tasks: (1) have the user input their Uber habits during a regular week and weekend and (2)
Objective In this assignment, you will perform two tasks: (1) have the user input their Uber habits during a regular week and weekend and (2) calculate the cost per semester that they will spend on Uber rides! Description For this assignment, think of how many Uber rides you and your friends took last semester. Thats a lot of money! Write a program to calculate how much money you will spend on Uber rides this semester. Task 1 Start your calculations by asking the user for their Uber statistics: The number of rides the user takes to class per week The number of miles from the users housing to campus o Remember that the user will also need a ride back home after class! The number of weekend rides to parties The number of miles between the users housing and the party o Be sure to calculate the round trip mileage here as well The number of extra passengers taking the Uber to the party, if any The percentage the user normally tips the driver Task 2 Using these inputs, you should be able to calculate the amount of money the user will be spending on Uber this semester if there are 16 weeks in a semester, and Uber rides cost $6 per mile on weekdays and $10 per mile on weekends. You should calculate each part of the semester equation, one step at a time. Use good variable naming to keep track of all the data being entered in. cout Precision Sample Output Welcome to the Uber calculator. Let's begin! How many times a week do you take Uber to class? (enter a nonzero integer): 2 How many miles is it from your apartment to campus? (enter a nonzero real number): 4 How many times a weekend do you take Uber to a party? (enter a nonzero integer): 1 How many miles is it from your apartment to the party? (enter a nonzero real number): 8 Do you have any extra riders to the party to split the cost on weekends? (enter 0-4): 2 What percentage do you usually tip? (enter 5, 10, 15, or 20): 10 Week days cost = $105.60 Weekends cost = $58.67 In total, you will spend $2628.27 on Uber rides this semester. That's a lot of dough! Submission For full credit, you need to submit the following items: 1. One C++ (.cpp) file that performs the two tasks described Please do not submit code in .docx, .txt, or any other format aside from .cpp! 2. Your report in .docx or .pdf formats following the template on the course website. Please do not submit a .pages file You do not need to zip up your work. Blackboard allows you to include multiple files in one submission.
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