Save Time & improve Grades
- Questions Asked
- Experts
- Total Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!
Chapter 7 Programming Logic and Design, PART 3 1. a. 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- ID number, first name, last name, and total amount spent this year. Every week, a transaction file is produced. It contains a customer- ID number, the service received (for example, Manicure), and the price paid. Each file is sorted in ID number order. 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- 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. Answer: A sample solution follows b. Modify the program to output a coupon for a free haircut each time a client exceeds $750 in services. The coupon, which contains the client- name and an appropriate congratulatory message, is output during the execution of the update program when a client total surpasses $750. Make sure that only one coupon is printed per client, even if the client has purchased multiple services to pass the $750 cutoff value. 2. The Timely Talent Temporary Help Agency maintains an employee master file that contains an employee ID number, last name, first name, address, and hourly rate for each temporary worker. The file has been sorted in employee ID number order. Each week, a transaction file is created with a job number, address, customer name, employee ID, and hours worked for every job filled by Timely Talent workers. The transaction file is also sorted in employee ID order. a. Design the logic for a program that matches the current week- transaction file records to the master file and outputs one line for each transaction, indicating job number, employee ID number, hours worked, hourly rate, and gross pay. Assume that each temporary worker works at most one job per week. Output one line for each worker, even if the worker has completed no jobs during the current week. b. Modify the help agency program to output lines only for workers who have completed at least one job during the current week. c. Modify the help agency program so that any temporary worker can work any number of separate jobs in a week. Print one line for each job that week. d. Modify the help agency program so that it accumulates the worker- total pay for all jobs in a week and outputs one line per worker.
Ask a question
Experts are online
Answers (1)
COM/204 COM204 COM 204 Chapter 7 Programming Logic and Design, PART 3
Answer Attachments
1 attachments —