Question: Write a complete C++ program for WorldParking Sdn Bhd. to perform the following: a. b. C. d. Write a return-value function named calcCharges() to

Write a complete C++ program for WorldParking Sdn Bhd. to perform the following: a. b. C. d. Write a return-value function named calcCharges() to 

Write a complete C++ program for WorldParking Sdn Bhd. to perform the following: a. b. C. d. Write a return-value function named calcCharges() to calculate and return the parking charges for the customers. The company charges a RM1.00 minimum fee to park for up to one hour. An additional RM0.50 will be charged for each hour exceeding the first one hour. The maximum charge for any given 24-hour period is RM10.00. Assume that no car parks for longer than 24 hours at a time. Write a void function named calcTotal() to calculate the total charges for all the customers. Write the main program that allows the user to input number of customers and the hours parked for the customers. The program should use the function caleCharges () above to calculate the parking charges for each customer and function calcTotal() above to calculate the total charges for all the customers. Finally, your program should output the parking charges for each customer and the total charges for all the customers. Use the appropriate parameters to pass values in and out of functions. 1 jam = RM 1 2 jam = RM 1.50 3 jam = RM 2.00 4 jam = RM 2.50 5 jam = RM 3.00 6 jam = RM 3.50 7 jam = RM 4.00 8 jam = RM 4.50 9 jam = RM 5.00 10 jam = RM 5.50 11 jam = RM 6.00 12 jam = RM 6.50 13 jam = RM 7.00 14 jam RM 7.50 15 jam RM 8.00 16 jam = RM 8.50 17 jam = RM 9.00 18 jam RM 9.50 19 jam 24jam = RM 10.00

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