Question: A c + + program. A Madison Square Garden street parking attendant charges $ 8 . 0 0 minimum fee to park for up to

A c++ program. A Madison Square Garden street parking attendant charges $8.00 minimum fee to park for up to 4 hours. The attendant charges an additional $2.50 per hour for each hour in excess of 4 hours. In addition, an extra $10 is charged if it's a commercial vehicle. The maximum charge for any 24-hour period, for any type of vehicle is $60. Write a program that calculates and prints the parking charges for each of three customers who parked their cars with the Madison Square Garden street parking attendant. The program should use the following functions:
getNameAndHours(): a void function that asks for the customers full name and Number of hours parked. Use pass-by-reference to send these two items to main().(5 points)
isCommercial(): a value returning function that asks if vehicle is commercial and returns true or false. (5 points)
calcCharges(): a value returning function that calculates and returns the charge for each customer to main().(20 points)
main() function should display the customer's full name, an indication of whether vehicle is commercial, hours and charge for each customer to an output file (report.txt).(10 points)
Use a for loop to prompt the user for their full name and number of hours parked and if vehicle is commercial for each of the three customers.
The variables for all charges and number of hours should be of type double.
 A c++ program. A Madison Square Garden street parking attendant charges

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 Databases Questions!