The Curl Up and Dye Beauty Salon maintains a master file that contains a record for each
Question:
The Curl Up and Dye Beauty Salon maintains a master file that contains a record for each of its clients. Fields in the master file include the client’s ID number, first name, last name, and total amount spent this year. Every week, a transaction file is produced. It contains a customer’s ID number, the service received (for example, Manicure), and the price paid. Each file is sorted in ID number order.
a. Design the logic for a program that matches the master and transaction file records and updates the total paid for each client by adding the current week’s price paid to the cumulative total. Not all clients purchase services each week. The output is the updated master file and an error report that lists any transaction records for which no master record exists.
b. Modify the program to output a coupon for a free haircut each time a client exceeds $1,000 in services. The coupon, which contains the client’s name and an appropriate congratulatory message, is output during the execution of the update program when a client total surpasses $1,000. Make sure that only one coupon is printed per client, even if the client has purchased multiple services to pass the $1,000 cutoff value.
Step by Step Answer: