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 $ minimum fee to park for up to hours. The attendant charges an additional $ per hour for each hour in excess of hours. In addition, an extra $ is charged if it's a commercial vehicle. The maximum charge for any hour period, for any type of vehicle is $ 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 passbyreference to send these two items to main points
isCommercial: a value returning function that asks if vehicle is commercial and returns true or false. points
calcCharges: a value returning function that calculates and returns the charge for each customer to main 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 reporttxt 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
