Question: You may use any C++ compiler for the programming assignments A mail-order house sells five different products whose retail prices are as follows: product 1,

You may use any C++ compiler for the programming assignmentsYou may use any C++ compiler for the programming assignments A mail-orderhouse sells five different products whose retail prices are as follows: product

A mail-order house sells five different products whose retail prices are as follows: product 1, $2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49; and product 5, $6.87. Write an application that reads a series of pairs of numbers as follows: a) Product number b) Quantity sold for one day If the quantity sold for the product is over 10, then 10% off is applied to the sales. If the quantity sold for the product is over 20 then 25% off is applied to the sales. You must create a function named Calculate which has 2 parameters to calculate the sales and return the sales. See the function maximum on page 216 for reference. Your program must use a switch structure to help determine the retail price for each product. It should calculate and display the total retail value of each product sold last week. Use a sentinel-controlled loop to determine when the program should stop looping and display the final results. You must create 2 separate files for this homework assignment. The Company.h file contains the class Company. The lab3.cpp file contains the main function. Hint: You may want to declare 5 member data to store the total sales for each product. G E:\Lowlcis 246\Lab3\Lab3.exe Enter product number (1-5) (0 to stop): 1 Enter quantity sold: 10 The sales for this product 1 is $29.80 Enter product number (1-5) (0 to stop): 2 Enter quantity sold: 20 The sales for this product 2 is $81.00 Enter product number (1-5) (0 to stop): 4 Enter quantity sold: 5 The sales for this product 4 is $22.45 Enter product number (1-5) (0 to stop): 1 Enter quantity sold: 15 The sales for this product 1 is $40.23 Enter product number (1-5) (0 to stop): 5 Enter quantity sold: 25 The sales for this product 5 is $128.81 Enter product number (1-5) (0 to stop): 2 Enter quantity sold : 30 The sales for this product 2 is $101.25 Enter product number (1-5) (0 to stop): 0 Total Sales for the week: Product 1: $70.03 Product 2: $182.25 Product 3: $0.00 Product 4: $22.45 Product 5: $128.81

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!