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

  Discuss about the multidimensional partitioning approach

Suppose that an application has M input variables and that each variable partitions the input space into N equivalence classes.

  Write a random shuffling routine

Write a random shuffling routine (do not invoke the shuffling routine from the library) and now display the shuffled ArrayList (Deck) of Cards.

  Detemining the ciphertext

Explain the ciphertext (in binary form) produced by the encryption of character. Explain what will the plaintext if ciphertext is 01111101.

  Access the customerm.java file

design the class file that is needed to be run with this code, that is, write the class file that is implied by the main method. Post this code to your MS Word solution document for this assignment.

  Design and implement an application reads in a set

Design and implement an application reads in a set of 200 grades into a two-dimensional array from a .txt file called studentanswers that represent.

  How many draws does it take on average to record k different

Think of an urn with n balls numbered from 1 to n. Sampling with replacement: A ball is drawn, its number is recorded, then the ball is returned.

  Write report using term switch assessment and requirement

The university presently uses an analog phone system and the administration is looking to deploy voice over IP solution. Before they move forward, they want to ensure that the environment can support the technology.

  What are the two methods of connecting to a cisco router

What are the two methods of connecting to a Cisco router for administrative purposes, maintenance, configuration, and so on?

  How might pick right value of k for k-fold cross validation

What is cross-validation? How might pick the right value of k for k-fold cross validation? How might know whether have collected enough data to train a model?

  Design an implementation approach for the database design

design an implementation approach for the database design process to the kelsey elementary school. include

  How do you decide which connections to eliminate

How do you decide which connections to eliminate and which to keep? In other words what information do you need to know about each regional office to determine.

  Calculate the peak performance in g flops with reasoning

Calculate the peak performance in G flops with reasoning in each of the following two vector supercomputers. The Cray Y-MP C-90 with 16 vector processors.

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