Starting Out with C++: Early Objects
Starting Out with C++: Early Objects
8th Edition
ISBN: 9780133360929
Author: Tony Gaddis, Judy Walters, Godfrey Muganda
Publisher: Addison-Wesley
bartleby

Videos

Textbook Question
Book Icon
Chapter 8, Problem 17PC

Theater Ticket Sales

Create a TicketManager class and a program that uses it to sell tickets for a single performance theater production. This project is intended to be designed and written by a team of two to four students. Here are some suggestions:

• One student might design and write the client program that uses the class, while other team members design and write the TicketManager class and all of its functions.

• Each student should be given about the same workload.

• The class design and the names, parameters, and return types of each function should be decided in advance.

• The project can be implemented as a multiple program, or all the functions can be cut and pasted into a single file.

Here are the specifications:

• The theater’s auditorium has 15 rows, with 30 seats in each row. To represent the seats, the TicketManager class should have a two-dimensional array of SeatStructures. Each of these structures should have data members to keep track of the seat's price and whether or not it is available or already sold.

• The data for the program is to be read in from two files located in the Chapter 8 programs folder on this book's companion website. The first one, SeatPrices. dat, contains 15 values representing the price for each row. All seats in a given row are the same price, but different rows have different prices. The second file, SeatAvai1abi1ity. dat, holds the seat availability information. It contains 450 characters (15 rows with 30 characters each), indicating which seats have been sold (‘*’) and which are available (‘#’). Initially all seats are available. However, once the program runs and the file is updated, some of the seats will have been sold. The obvious function to read in the data from these files and set up the array is the constructor that runs when the TicketManager object is first created.

• The client program should be a menu-driven program that provides the user with a menu of box office options, accepts and validates user inputs, and calls appropriate class functions to carry out desired tasks. The menu should have options to display the seating chart, request tickets, print a sales report, and exit the program.

• When the user selects the display seats menu option, a TicketManager function should be called that creates and returns a string holding a chart, similar to the one shown here. It should indicate which seats are already sold (#) and which are still available for purchase (#). The client program should then display the string.

Blurred answer
Students have asked these similar questions
Scheduling a Class (Intermediate above) You are an administrator for the Kulliyyah and is assigned the task to schedule a set of classes for a given day. Unfortunately, there is only one lecture hall and therefore, two classes cannot run at the same time. This is usually an easy task, however, there are some criteria that you would have to consider. The criteria are as follows:   ·     Each class has a duration class time. ·     Higher level courses has higher priority than other low level courses.  ·     Some lecturers prefer to have morning classes instead of the afternoon classes because they come to the office much earlier than other lecturers so they should be scheduled earlier.   Your job is to propose the best scheduling based on this criteria. To do this, you will write a C++ program that will first sort the classes by lecturer arrive time and then by course levels. Lecturers arriving early, can start first, but if they arrive at the same time, the higher level course will go…
: Class Diagram for University Admission System Design a University Admission System Class Diagram in which student gets enroll in a semester. The semester has an ID number and there are two kinds of semester, First semester and Second semester, and each semester contains courses. Each course has a title and course Code The course can be registered dropped withdraw by the students. Each student has a name and student number, and there are two kinds of students, Undergraduate Students (for BCS & MCS) and Postgraduate Students (for MPhil & PhD). Each type of students enroll in different ways.
Chat Application Write a GUI Java program to implement a client/server chat application using Java sockets and threads. 1000 ... Server Client Client Connected to: localhost Now Connected to localhost Send Send Project instructions 1) The total grade for the project is 05 marks. 2) Each student must implement the project individually without any participation with other students. 3) Your program has to be split into several appropriate functions and classes. 4) The style and readability of your program will also determine your grade, in addition to the correctness of the program. Write your Code here Paste your Output Screen here Server

Chapter 8 Solutions

Starting Out with C++: Early Objects

Ch. 8.6 - Given the following array definition: int values...Ch. 8.6 - Prob. 8.12CPCh. 8.6 - Prob. 8.13CPCh. 8.6 - What is the output of the following code? const...Ch. 8.8 - Write a typedef statement that makes the name...Ch. 8.8 - Prob. 8.16CPCh. 8.8 - What is the output of the following program...Ch. 8.8 - The following program segments, when completed,...Ch. 8.10 - Prob. 8.19CPCh. 8.10 - Prob. 8.20CPCh. 8.10 - Prob. 8.21CPCh. 8.10 - Prob. 8.22CPCh. 8.10 - Prob. 8.23CPCh. 8.10 - Fill in the empty table below so it shows the...Ch. 8.10 - Write a function called displayArray7. The...Ch. 8.10 - Prob. 8.26CPCh. 8.11 - Prob. 8.27CPCh. 8.11 - Write definition statements for the following...Ch. 8.11 - Define gators to be an empty vector of ints and...Ch. 8.12 - True or false: The default constructor is the only...Ch. 8.12 - True or false: All elements in an array of objects...Ch. 8.12 - What will the following program display on the...Ch. 8.12 - Complete the following program so that it defines...Ch. 8.12 - Add two constructors to the Product structure...Ch. 8.12 - Prob. 8.35CPCh. 8.12 - Prob. 8.36CPCh. 8.12 - Prob. 8.37CPCh. 8.12 - Write the definition for an array of five Product...Ch. 8.12 - Write a structure declaration called Measurement...Ch. 8.12 - Write a structure declaration called Destination ,...Ch. 8.12 - Define an array of 20 Destination structures (see...Ch. 8 - The ________ indicates the number of elements, or...Ch. 8 - The size declarator must be a(n) _______ with a...Ch. 8 - Prob. 3RQECh. 8 - Prob. 4RQECh. 8 - The number inside the brackets of an array...Ch. 8 - C++ has no array ________ checking, which means...Ch. 8 - Prob. 7RQECh. 8 - If a numeric array is partially initialized, the...Ch. 8 - If the size declarator of an array definition is...Ch. 8 - Prob. 10RQECh. 8 - Prob. 11RQECh. 8 - Prob. 12RQECh. 8 - Arrays are never passed to functions by _______...Ch. 8 - To pass an array to a function, pass the ________...Ch. 8 - A(n) ________ array is like several arrays of the...Ch. 8 - Its best to think of a two -dimensional array as...Ch. 8 - Prob. 17RQECh. 8 - Prob. 18RQECh. 8 - When a two -dimensional array is passed to a...Ch. 8 - Prob. 20RQECh. 8 - Look at the following array definition. int values...Ch. 8 - Given the following array definition: int values...Ch. 8 - Prob. 23RQECh. 8 - Assume that array1 and array2 are both 25-element...Ch. 8 - Prob. 25RQECh. 8 - How do you establish a parallel relationship...Ch. 8 - Look at the following array definition. double...Ch. 8 - Prob. 28RQECh. 8 - Prob. 29RQECh. 8 - Prob. 30RQECh. 8 - Prob. 31RQECh. 8 - The following code totals the values in each of...Ch. 8 - In a program you need to store the identification...Ch. 8 - Prob. 34RQECh. 8 - Prob. 35RQECh. 8 - Prob. 36RQECh. 8 - Prob. 37RQECh. 8 - Prob. 38RQECh. 8 - Each of the following functions contains errors....Ch. 8 - Soft Skills Diagrams are an important means of...Ch. 8 - Perfect Scores 1. Write a modular program that...Ch. 8 - Roman Numeral Converter Write a program that...Ch. 8 - Chips and Salsa Write a program that lets a maker...Ch. 8 - Monkey Business A local zoo wants to keep track of...Ch. 8 - Rain or Shine An amateur meteorologist wants to...Ch. 8 - Lottery Write a program that simulates a lottery....Ch. 8 - Rainfall Statistics Write a modular program that...Ch. 8 - Chips and Salsa Version 2 Revise Programming...Ch. 8 - Stats Class and Rainfall Statistics Create a Stats...Ch. 8 - Stats Class and Track Statistics Write a client...Ch. 8 - Prob. 11PCCh. 8 - Drivers License Exam The State Department of Motor...Ch. 8 - Array of Payro11 Objects Design a PayRoll class...Ch. 8 - Drink Machine Simulator Create a class that...Ch. 8 - Bin Manager Class Design and write an object...Ch. 8 - Tic-Tac-Toe Game Write a modular program that...Ch. 8 - Theater Ticket Sales Create a TicketManager class...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
C++ Data Members; Author: CppNuts;https://www.youtube.com/watch?v=StlsYRNnWaE;License: Standard YouTube License, CC-BY