Calculate the total quantity times price paid for each


write a C++ program that processes records of items purchased. Assume the items are being purchased by one person.

Create a class definition for item records with the following fields: id, name, quantity, regular price, price paid, and total for item. Dynamically allocate an array and read records from a file.

You will read all fields except the price paid and total. See below.

Calculate price paid for items. Customers get a 10% discount off regular price of item if they purchase 10 or more of the item.

Calculate the total (quantity times price paid) for each record. Sort the records in the array by the item's name using the generic sort function in the file sort.h.

Write the updated records out to a new file (orderout.txt). Include all field data.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Calculate the total quantity times price paid for each
Reference No:- TGS01290025

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)