The language is C++ for visual studio express 2013 for windows
create a TicketManager class and a program that uses the class to sell tickets for a performance at a theater.
Here are all the specs. This is an intense program, please follow all instructions carefully.
-I am only creating the client program that uses the class and all it's functions
-The client program is a menu-driven program that provides the user with box office options for a theater and accepts AND validates user inputs, and calls appropriate class functions to carry out desired tasks. The menu options should be , display the seating chart, request tickets, print sales report, and exit program.
-When the user selects the display seating chart option, a TicketManager class function should be called and once the function runs the client program should then display the string from the function.
-When the user selects the request tickets option, the program will prompt the user for the number of seats requested, desired row number and desired starting seat number in the row. A TicketManager ticket function should then be called and passed this user information to handle the request. If the seats requested do not exist or are unavailable and appropriate message should be returned from the function and displayed by the client program. If the seats are available a string will be created by the function that lists the number of requested seats, proce per seat, total price per seats. The user program should then ask the user if they wish to make this purchase.
-If the user indicates they want to make the purchase a TicketManager purchase module will be called to handle the sale. This module will then return a string to the client program.
-When the user selects the sales report option, a TicketManager report module will be called and return a report of sales info to the client program.
-When the user selects the exit program option, the program needs to be able to write the updated seat availability back out to the file. This will be done by the TicketManager destructor.
//main.cpp
#include <iostream>
#include <iomanip>
#include <string>
#include <cctype>
#include <fstream>
using namespace std;
ifstream infile("SeatPrices.dat");
ifstream infile2("SeatAvailability.dat");
ofstream outfile("SeatResult.dat");
struct SeastStructures
{
double cost;
char valid;
};
class TicketManager
{
private:
SeastStructures theater[15][30];
int seatTotal;
double priceTotal;
public:
TicketManager();
~TicketManager();
void viewPrice();
void viewSeats();
void orderSeats(int, int, int, char&);
void updateSeats(int, int, int);
void report();
};
// Default Constructor
TicketManager::TicketManager()
{
seatTotal = priceTotal = 0;
double price;
for (int row = 0; row < 15; row++)
{
infile >> price;
for (int col = 0; col < 30; col++)
{
theater[row][col].cost = price;
infile2 >> theater[row][col].valid;
}
}
}
// Destructor
TicketManager::~TicketManager()
{
for (int row = 0; row < 15; row++)
{
outfile << "Row " << left << setw(8) << row + 1;
for (int col = 0; col < 30; col++)
{
outfile << theater[row][col].valid;
}
outfile << endl;
}
outfile << "Seats Sold: " << seatTotal << endl;
outfile << "Seats Available: " << (15 * 30) - seatTotal << endl;
outfile << "Money Collected: $" << priceTotal << endl;
outfile.close();
}
// View Price member function
void TicketManager::viewPrice()
{
for (int row = 0; row < 15; row++)
{
for (int col = 0; col < 30; col++)
{
cout << theater[row][col].cost<< " ";
}
cout << endl;
}
}
// View Seats member function
void TicketManager::viewSeats()
{
for (int row = 0; row < 15; row++)
{
cout << "Row " << left << setw(8) << row + 1;
for (int col = 0; col < 30; col++)
{
cout << theater[row][col].valid;
}
cout << endl;
}
}
// Order Seats Member Function
void TicketManager::orderSeats(int number, int rowNum, int startNum, char& purchase)
{
bool order = true;
for (int x = 0; x < number; x++)
{
if (theater[rowNum][startNum+x].valid == '*')
{
cout << "Seats are not available" << endl;
order = false;
purchase = 'N';
break;
}
}
if (order)
{
cout << "The number of requested seats: " << number << endl;
cout << "The price for each seat in this row is: $" << theater[rowNum][0].cost << endl;
cout << "The total cost is: $" << theater[rowNum][0].cost * number << endl;
cout << endl << "Do you want to purchase these seats? (Y/N) ";
cin >> purchase;
}
}
// Update Seats Member Function
void TicketManager::updateSeats(int number, int row, int colum)
{
for (int x=0; x < number; x++)
{
theater[row][colum+x].valid = '*';
}
}
// Report Member Function
void TicketManager::report()
{
for (int row = 0; row < 15; row++)
{
for (int col = 0; col < 30; col++)
{
if (theater[row][col].valid == '*')
{
seatTotal++;
priceTotal += theater[row][col].cost;
}
}
}
cout << "Seats Sold: " << seatTotal << endl;
cout << "Seats Available: " << (15 * 30) - seatTotal << endl;
cout << "Money Collected: $" << priceTotal << endl;
}
// Client/Test Program
int main()
{
string line;
int choice, row, seatAmount, startingSeat;
char purchase;
TicketManager theater;
cout << fixed << setprecision(2);
do
{
cout << "Box Office Option Menu" << endl;
cout << "1. Display Seating Chart" << endl;
cout << "2. Request Tickets" << endl;
cout << "3. Print Sales Report" << endl;
cout << "4. Exit Program" << endl;
cin >> choice;
while (choice < 1 || choice > 4)
{
cout << "Please enter a valid input (1-4): ";
cin >> choice;
}
switch (choice)
{
case 1:
cout << endl << "Displaying the seating chart of the theater" << endl;
theater.viewSeats();
break;
case 2:
cout << endl << "How many seats do you want: ";
cin >> seatAmount;
cout << "In what row do you want to sit? ";
cin >> row;
cout << "Set your starting/column seat number: ";
cin >> startingSeat;
theater.orderSeats(seatAmount, row, startingSeat, purchase);
if (toupper(purchase) == 'Y')
{
cout << "The seats have been purchased" << endl;
theater.updateSeats(seatAmount, row, startingSeat);
}
else
{
cout << "The seats have not been purchased" << endl;
}
break;
case 3:
cout << endl << "Here is the report " << endl;
theater.report();
break;
case 4:
cout << endl << "Thank you for the time, come again soon!" << endl;
break;
}
cout << endl;
} while (choice != 4);
infile.close();
infile2.close();
return 0;
}
==================================================================================
sample output

The language is C++ for visual studio express 2013 for windows create a TicketManager class and...
Can you help us!! Thank you!
C++
Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater's auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with...
Your assignment is to design a TicketManager class that can keep track of the number of seats available in a theater’s auditorium. The TicketManager class should have a two-Dimensional array, which has 15 rows and 30 columns for all the seats available in the auditorium, also an array of double to keep track of the price of tickets for each row. Each row has a different price. Use the following UML diagram to design the class: -------------------------------------------------------------------- + NUMROWS :...
Using C not C++, 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...
Write a program in C to assign seats of a movie theater (capacity: 200 seats). Your program should display the following menu of alternatives: Please type 1 for "section A, $50/ticket" type 2 for "section B, $70/ticket", and type 3 for "section C, $80/ticket". If the user types 1, then your program should assign a seat in the A section (seats 1–50). If the user types 2, then your program should assign a seat in the B section (seats 51–100). If...
P7.5– A theater seating chart is implemented as a two-dimensional array of ticket prices, like this: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30...
The Course Project can be started in Week 7 and is due by 11:59
pm CT Saturday of Week 8. It must follow standard code formatting
and have a comment block at the top of the code file with a
detailed description of what the program does. Functions must have
a comment block with a detailed description of what it does.
Pseudocode must be provided in the comment block at the top of the
file. This program will allow the...
For this week's assignment , create and complete a Windows application for the following question. Airline Reservation System: An airline has just bought a computer for its new reservation system. Develop a new system to assign seats on the new airplane( capacity: 10 seats) Display the following alternatives: "Please type 1 for first class, and please type 2 for Economy". If the user enters 1, your application should assign a seat in the first class( seats 1-5). If the user...
In Python There are 3 seating categories at a stadium. Class A seats cost $20, class B cost $15, and class C $10. Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from tickets sales. This program should have main, calcIncome, and showIncome functions. Main function should get number of seats sold for each category and sent to calcIncome. calcIncome calculates income for each category, the return...
C# WINDOWS FORMS APPLICATION (not CONSOLE APPLICATION ) (Please screenshot window form of this program and write code on computer. Thank you very much !) For this week's assignment , create and complete a Windows application for the following question. Airline Reservation System: An airline has just bought a computer for its new reservation system. Develop a new system to assign seats on the new airplane( capacity: 10 seats) Display the following alternatives: "Please type 1 for first class, and...
C++ Create a class called Plane, to implement the functionality of the Airline Reservation System. Write an application that uses the Plane class and test its functionality. Write a method called CheckIn() as part of the Plane class to handle the check in process Prompts the user to enter 1 to select First Class Seat (Choice: 1) Prompts the user to enter 2 to select Economy Seat (Choice: 2) Assume there are only 5-seats for each First Class and Economy...