Theater Ticket Sales
Create a TicketManager class and a
• 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.
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Starting Out with C++: Early Objects
Additional Engineering Textbook Solutions
Starting Out With Visual Basic (8th Edition)
Starting Out with Python (3rd Edition)
Concepts Of Programming Languages
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting out with Visual C# (4th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
- Object adapters and class adapters each provide a unique function. These concepts are also significant due to the significance that you attach to them.arrow_forwardDesign a class diagram for the following project description online retailer system The system will deal with a number of domain entities – including items, orders, and customers. The items that we sell fall into user-defined categories. Some categories, such as liquor, are flagged as being restricted – customers under the age of 18 are not allowed to buy restricted items, and the system should raise an exception if they attempt to. In addition, we have to maintain certain details on all items – such as the item name, description, price, and category The system also need to maintain customer information – including names, email addresses, and age. Each customer has to have an address, to be used for billing and delivery. Customers can change their details whenever they want When a customer places an order, the system will calculate a delivery fee by using delivery priority and distance from warehouse. Orders of more than $100 qualify for free delivery, at normal priority. Overnight…arrow_forwardC# Languagearrow_forward
- Project 4: PyGame Assignment Overview This assignment focuses on the design, implementation and testing of PyGame programs to build games. Assignment Specifications Go to Invent with Python, Making Games with Python & PyGame and choose either Chapter 4: Slide Puzzle or Chapter 5: Simulate to complete. Assignment Note These chapters have quite a bit more information than the previous projects you have completed but as you have figured out by now, making a game in PyGame is a more lengthy process. You are allowed to use the chapter as a tutorial as to what you need to do to create the game. You are allowed to use the files in the chapter, rather than build the code from scratch. You must then change something in the code to make the game different to create your own remix. Assignment Deliverable You must turn in a file called proj04.py – this is your source code solution; be sure to include your names, the project number and comments describing your code.arrow_forwardChat 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 Serverarrow_forward1. IntroductionCCCS 121Object Oriented Programming language Group Course ProjectAn object-based application is an application that involves objects created out of classes. These objects interact with each other to fulfill certain functionalities.The focus of this project is to develop an application written in java which involves the use of object-oriented programming. This project is a group project. As a student you will be given a chance to come up with an idea for your project. However, the project must satisfy the requirements given in this document.This document shall be used as a set of guidelines. You are allowed to make necessary additions and/or changes to the requirements with prior approval from your instructor.2. RequirementsPropose and implement an application, that contributes to solving a real-life problem. Your application should include at least the following:2.1 Classes3 to 4 classes each one of them should have:A. B. C.A number of private and public attributes. The…arrow_forward
- Class Exercise # 1 Create a class hierarchy with base class as Student and derived classes are Part-Time and Full-Time Full-time students will have an extra field to hold two Exam scores Use suitable data structure to hold 15 quizzes scores for each student (part-time or full-time) Create a class Session Use data structure to hold 20 students in a Session, some are part-time, some are full-time Create public methods to calculate average quiz scores per student for the whole class Create public method to print the list of quiz scores in ascending order for one session Create public method to print names of part-time students Create public method to print exam scores of full-time students Main Program Create an instance of Session, populate it with 20 students and dummy scores Call all public methods of Session and capture the output of those methods on consolearrow_forwardProcess Scheduling: Select all statements below that are true The waiting time is included in the turnaround time. In interactive systems, short response times are unimportant. The time taken in an interactive program from the issuance of a command to the commencement of a response to that command is known as the response time. The response time is the time required for a particular process to complete, from submission time to completion. Throughput is the number of processes executed per time unit. The concept of virtual (run)time in the Completely Fair Scheduler is used to ensure fairness in the allocation of processor capacity.arrow_forwardC# Language Create a Product class then create an object from that class using User Input. The program must have Constructor.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education