Calculate the total fare as base fare per minute

Assignment Help Computer Engineering
Reference no: EM132196683

Write a C++ program to simulate uber's method of calculating cost of ride

INPUT Your program is to prompt the user for: - Rider's first and last name in one prompt - the length of ride in minutes - the distance of ride in miles - code of 'X'for uberX ( Uber's budget option) or code of 'S' for SUV, or ‘L' for luxury car. - code for whether or not there is a surge for the trip. Letter'Y' for yes and ‘N' for no. - if and only if code for surge is ‘Y' ask the user for the surger multiplier.

CALCULATE Calculate the total fare as base fare + per minute x number of minutes + per mile x number of miles. If there is a surge fee then multiple the base fare by the surge fee before calculating total fare. If total fare is less than minium fee then total fare is set equal to minimum fare.

Use the following fee schedule: Type of vehicle base fare per minute per mile Minimum fare UberX $ 2.00 $ 0.22 $ 1.15 $ 6.55 SUV $15.00 $ 0.90 $ 3.75 $ 25.00 Luxury $ 5.00 $ 0.50 $ 2.75 $10.55 OUTPUT A sample run might look like this:

Enter enter time in minutes: 70 Enter enter distance: 55 Enter 'X' for uberX or 'S' for SUV or ‘L for luxury: x Enter 'Y' if surge or ‘N' if not: Y Enter surge multi

Reference no: EM132196683

Questions Cloud

Show the effects on the market : Find an article from the New York Times, Wall Street Journal, the internet, or another publication concerning a particular change in a specific market.
What do you remember about the times : Take a look at real GDP over the past decades with this graph: (note the gray bars on the graph denote the recessions). How many recession have you lived.
Generate email address and identification number of students : Write a C program so that a user can enter first and last name of students. Generate email address and identification number of the students.
Print the frequency count out to the console : Write a c++ program that uses a map to store the frequency counts for all words in the attached excerpt from H.G. Wells "War of the Worlds".
Calculate the total fare as base fare per minute : Calculate the total fare as base fare + per minute x number of minutes + per mile x number of miles.
An array that can hold twenty integers which should be input : Display those input values on the screen, and then prompt the user for an element to be searched in this array.
Reflect the personal thoughts and observations : After reading the article Making Markets Work located in Files, students are assigned to Review, Discover, and Comment on the assigned article.
Justify relationship using specific vocabulary and concepts : Select a news article from a legitimate news source that reflects an issue of local, state, national, or international political significance.
Develop a functional website : CP1406 - Interactive Media and Web Technologies - Use the project plan and comps to develop a functional website. Your site should be "completed"

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is the name of the scanning application

What is the name of the scanning application that is better for performing a software vulnerability assessment with suggested remediation steps?

  Why is statistical analysis used instead of nlp

What role does text retrieval have in text analytics and mining? Which type of word tells us the most about a document, high or low entropy H(x) words?

  What is system speed up when the 8-core cpu is used

What is system speed up (as defined by Amdahl's law) when the 8-core CPU is used in place of the single core CPU?

  What is the time complexity for pushing an element

If we amortize this, what is the time complexity for pushing an element in the back of the array? What about the front of the array?

  Describe what is e-commerce and mobile technology

Your company is experiencing decline in business because of competition. Your manager thinks they may be able to turn the company around if they can get help.

  Define future global cyber security issues

Discuss the political issues associated with Future Global Cyber Security Issues. Specifically discuss the political issues associated

  Discuss the importance of network monitoring software

In discussions with the IT Director you discover that previous requests for network monitoring software were denied despite the large number of devices.

  How would you handle the computer issue

Based on what you have learned in this lesson, what skills would be required in dealing with this customer? Explain. How would you handle the computer issue?

  Describe the two site examples which have images or

what are two site examples that have images or multimedia that are used effectively on the site? why do you think they

  Write an application that creates variable of type integer

Write an application that creates 2 variable of type integer. Prompt the user to enter two integer values, and assigns each value to one of the variables.

  Explain computer programming is art or science

Which programming language appeals to you, and which language do you consider least appealing.

  How to support the high bandwidth applications and growth

You have been contracted to create a network for a multimedia development firm that currently uses a 10-Mbps Ethernet network. The company requires a high-bandwidth network for the multimedia team, that constantly views and manipulates large files ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd