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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
 
 

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.

 

 

Expert Solution
steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education