Write a complete C++ program that will solve the following problem: The Shubert Theater in New Haven would like you to write a program for them to process ticket charges for their shows. Customers purchasing tickets can use them at any time while the play is on Each customer is charged a ticket processing fee of 12.99. Additionally, the following table rates apply to a customer for their tickets Play Code Play Section Code о Ticket Cost Once a New Musica Once a New Musical Once a New Musical Cinderella Cinderella B $104 $88 554 $76 $38 (Section Code © = Orchestra, M = Mezzanine B = Balcony) The Orchestra seats (O) are on the first level and are the best seats in the house. The seats in the Mezzanine level is on the second floor, further away from the stage. The Balcony seats are on the 3 level and are the cheapest seats. Your program should do the following: A. Get data from a file called: customers.dat. The file contains the customer ID number, the number of tickets desired, the play code of the desired play they wish to attend, and the section code of the desired seats for the play. Cust ID Qty of Tickets Play Code Section Code 1111 2222 3333 4444 5 2 1 10 A B A B B 4 customers.dat M B. Calculate the cost of tickets using the quantity of tickets, the play code, the section code for each customer, and the ticket processing fee. C. Output the Customer ID, the play requested, and the total cost for the customer. (Your program will Keep on processing tickets for the entire data file.) D. After the entire file is read and processed, your program should output the number of customers processed and the total amount charged all customers.
Write a complete C++ program that will solve the following problem: The Shubert Theater in New Haven would like you to write a program for them to process ticket charges for their shows. Customers purchasing tickets can use them at any time while the play is on Each customer is charged a ticket processing fee of 12.99. Additionally, the following table rates apply to a customer for their tickets Play Code Play Section Code о Ticket Cost Once a New Musica Once a New Musical Once a New Musical Cinderella Cinderella B $104 $88 554 $76 $38 (Section Code © = Orchestra, M = Mezzanine B = Balcony) The Orchestra seats (O) are on the first level and are the best seats in the house. The seats in the Mezzanine level is on the second floor, further away from the stage. The Balcony seats are on the 3 level and are the cheapest seats. Your program should do the following:
A. Get data from a file called: customers.dat. The file contains the customer ID number, the number of tickets desired, the play code of the desired play they wish to attend, and the section code of the desired seats for the play. Cust ID Qty of Tickets Play Code Section Code 1111 2222 3333 4444 5 2 1 10 A B A B B 4 customers.dat M
B. Calculate the cost of tickets using the quantity of tickets, the play code, the section code for each customer, and the ticket processing fee.
C. Output the Customer ID, the play requested, and the total cost for the customer. (Your program will Keep on processing tickets for the entire data file.)
D. After the entire file is read and processed, your program should output the number of customers processed and the total amount charged all customers.
Step by step
Solved in 2 steps with 5 images