
This
suggestions:
o One student should design function main, which will call the other functions in
the program. The remainder of the functions will be designed by other members
of the team.
o The requirements of the program should be analyzed so each student is given
about the same work load.
o The parameters and return types of each function should be decided in advance.
o The program can be implemented as a multi-file program, or all the functions can
be cut and pasted into the main file.
Here is the assignment: Write a program that can be used by a small theater to sell tickets for
performances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. The
program should display a screen that shows which seats are available and which are taken.
For example, the following screen shows a chart depicting each seat in the theater. Seats that
are taken are represented by an * symbol, and seats that are available are represented by a #
symbol:
Here is a list of tasks this program must perform:
o When the program begins, it should ask the user to enter the seat prices for each
row. The prices can be stored in a separate array. (Alternatively, the prices may be
read from a file.)
Once the prices are entered, the program should display a seating chart similar to
the one shown above. The user may enter the row and seat numbers for tickets
being sold. Every time a ticket or group of tickets is purchased, the program
should display the total tickets and price for the purchased and then update the
seating chart.
o The program should keep a total of all ticket sales. The user should be given an
option of viewing this amount.
o The program should also give the user an option to see a list of how many seats
have been sold, how many seats are available in each row, and how many seats
are available in the entire auditorium.
Input Validation: When tickets are being sold, do not accept row or seat numbers that do
not exist. When someone requests a particular seat, the program should make sure that
seat is available before it is sold.


Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 3 images

- Functions allow you to create subtasks that will allow you to make programs more manageable. What type of algorithms do you believe are essential for managing complex programs? What is the role of repetition when designing a function?arrow_forwardPlease do the exercise! I want to confirm my work Thank you very mucharrow_forwardFor Assignment 5, you will design and write a program that covers the following topics: Functions, Vectors, Structures, and Classes. Functions & Passing Variables: Write a different function for each type of variable used. The functions should provide some sort of output through a cout or return value. Normal variable: Passing a variable by value to a paramater of a function. Show that this only makes a copy of the variable passed to it. Normal variable with a default value: Set a default value for a function parameter. Show how the default value gets used. Reference variable: Passing a variable by reference to a parameter of a function. Show how a reference variable can change the value of variable in main(). Show how the use of const can make a reference variable safer (think of it in terms of read/write). Pointer variable: Passing an address of a variable to a parameter of a function. Show how a pointer can change the value of a variable in main(). Show…arrow_forward
- Why is it necessary to create function prototypes in a program with user-defined functions?arrow_forwardAll lines of code in your program can be reached and executed when I run your program define two functions and they have a "meaningful purpose" to your program. Each function must have more than three statements or lines of code. At least one function defines a parameter and you use this parameter in a meaningful way At least one function returns a value back to the code that is calling it and it is used in a meaningful wayarrow_forwardPlease label each part!!arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





