Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a complete C++ program that helps the cashier to calculate the price of the rent movies. The program should perform the following tasks: Task
Write a complete C++ program that helps the cashier to calculate the price of the rent movies. The program should perform the following tasks: Task 1: Write a function named calcAverage. (4.5 marks) a) It takes the total number of each rented movie type as input parameters. b) The function should calculate the average number of movies rented per movie type. c) It should return the average value calculated in (b). Task 2: Write a function named calcPrice. (9.5 marks) a) It takes the total rate as an input parameter. b) The function should calculate the final price based on the discount based on the conditions in Table 1. Table 1 Rate Range Below RM 35.00 Between RM 35.00 to RM 60.00 Above RM 60.00 Discount(%) 10 15 25 c) It should return the final price calculated in (b)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started