Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 inarks) 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). Task 3: Write a function named getInput. (5.5 marks) a) This is a non-returning function. b) It takes the number of movies to rent for each movie type (movie type 1. movie type 2, and movie type 3) as input parameters. c) The function should ask the user to enter the number of movies to rent for each movie type. d) It sends all the values entered by the user in (c) back to the calling module through the use of reference parameters. Task 4: Write a function named dispRentalSummary (13 marks) a) This is a non-returning function. b) It takes the overall total of total rate and the total number of each rented movie type as input parameters. c) The function should display the overall total of total rate and the average number of movies rented per movie type by calling the calcAverage function as been shown in the Rental Summary section as in sample execution given below. d) The function also needs to determine which type of movie that have the highest total number of rental and how much the total number of the highest rented movie type

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

Describe the economic model that is proposed for the operation.

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago