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

  Describe the phases of an injection molding cycle

Describe the phases of an injection molding cycle. Classify the mold types. Describe these types. What does a shrink factor do? Why do we need it in mold design

  During a whole class discussion describe the association

during a whole class discussion describe the association between information systems and the concept of competitive

  Write a program to find the longest simple path from x to y

Write a program to find the longest simple path from x to y in a given weighted graph. Give a nondeterministic polynomial-time algorithm.

  Utilize linked stack class to support an application

Utilize Linked stack class to support an application

  Prepare a high level training program for the end users on

Suppose you are working on a project and you are required to create a high level training program for the end users on how to use your final project.

  Write a program that searches for a solution

Write a program that searches for a solution. First run the program on a sequential computer (such as on a workstation or even a personal computer).

  Conduct project that is technical that fall within computing

Choose to conduct a project that is technical (i.e. practically based e.g. development of a prototype, simulation, design framework etc) that fall within computing and IT curriculum.

  Describe the Architecture of a Java EE application

Describe the Architecture of a Java EE application that describes the above system. Describe architectural style(s) you are following

  Why using euler''s method is the simplest numerical method

This is being solved by computer code in c++ to obtain numerical approx to ODE. Using Euler's method is the simplest numerical process for approximation solving initial value ODE'S.

  Implement a class address

Implement a class Address. An address has a house number, a street, an optional apartment number, a city, a state, and a postal code. Supply two constructors: one with an apartment number and one without.

  Program that prints to screen results of dividing 23 by 5

create a program, using C++ that prints to screen the results of dividing 23 by 5, where 23 and 5 are ints. Provide the results of what was printed to screen via comments in the program ; need in hardcopy.

  Identify the security problems

What is a( IPSEC, SSL , VPN, DTLS , DMARC, PKI, PEM, SSH, Kerberos, DKIM) ?. Brifley and answer the following brief.

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