Question

Your assignment is to design a TicketManager class that can keep track of the number of...

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 : static final int = 15

+NUMCOLUMNS : static final int = 30

-seats[NUMROWS][NUMCOLUMNS] : char

-price[NUMROWS]: double

-int : seatsSold

-double : totalRevenue

==========================

+TicketManager()

+requestTickets(int, int, int): bool

+purchaseTickets(int, int, int) : bool

+getTotalRevenu(): double

+ getSeatsSold() : int

+ getPrice(int) : double

+ getSeat (int, int) : char

+ printTickets(int, int, int): void

-------------------------------------------------------------

You will need to create two files – TicketManager.java file, and Assignment8.java file which has the main method.

• Your program should read from two files, seatAvailability.txt and seatPrices.txt (they need to be downloaded from the course website.) If your folder is named “Assignment8”, then they need to be placed within the folder “Assignment8”. You can write click and save the files.

• The size of the 2-D arrays will be decided by NUMROWS and NUMCOLUMNS. In your class, you declare it as: public class TicketManager { public static const int NUMROWS = 15; public static const int NUMCOLUMNS = 30; ………..…… }

Sample Runs:

Sample runs:

User input is represented by bold

ASU Gammage Theater

1. View Available Seats

2. Request Tickets

3. Display Theater Sales Report

4. Exit the Program

1

Seats 123456789012345678901234567890

Row 1 ##############################

Row 2 ##############################

Row 3 ##############################

Row 4 ##############################

Row 5 ##############################

Row 6 ##############################

Row 7 ##############################

Row 8 ##############################

Row 9 ##############################

Row 10 ##############################

Row 11 ##############################

Row 12 ##############################

Row 13 ##############################

Row 14 ##############################

Row 15 ##############################

Legend:

* = Sold

# = Available

ASU Gammage Theater

1. View Available Seats

2. Request Tickets

3. Display Theater Sales Report

4. Exit the Program

2

Number of seats desired (1 - 30): 3

Desired row (1-15): 1

Desired starting seat number in the row (1 - 30): 1

The seats you have requested are available for purchase.

The total purchase price is 3 X $12.50 = $37.50

Do you wish to purchase these tickets (Y/N)? y

Num Seats: 3

The price for the requested tickets is $ 37.50

Please input amount paid: $4

0 ***********************************************

* Gammage Theater *

* Row 1 Seat 1 *

* Price: $ 12.50 *

*********************************************** ***********************************************

*Gammage Theater *

* Row 1 Seat 2 *

* Price: $ 12.50 *

*********************************************** ***********************************************

* Gammage Theater *

* Row 1 Seat 3 *

* Price: $ 12.50 * ***********************************************

Tickets purchased: 3

Payment : $ 40.00

Total ticket price: $ 37.50

Change due : $ 2.50

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Your assignment is to design a TicketManager class that can keep track of the number of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • In Java; Given numRows and numColumns, print a list of all seats in a theater. Rows...

    In Java; Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Use separate print statements to print the row and column. Ex: numRows = 2 and numColumns = 3 prints: 1A 1B 1C 2A 2B 2C import java.util.Scanner; public class NestedLoops { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); int...

  • (Java Zybooks) Given numRows and numColumns, print a list of all seats in a theater. Rows...

    (Java Zybooks) Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Use separate print statements to print the row and column. Ex: numRows = 2 and numColumns = 3 prints: 1A 1B 1C 2A 2B 2C import java.util.Scanner; public class NestedLoops { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); int...

  • (Java Zybooks) Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Use s...

    (Java Zybooks) Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print a space after each seat, including after the last. Use separate print statements to print the row and column. Ex: numRows = 2 and numColumns = 3 prints: 1A 1B 1C 2A 2B 2C import java.util.Scanner; public class NestedLoops { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); int...

  • Using C not C++, Write a program that can be used by a small theater to...

    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...

  • Can you help us!! Thank you! C++ Write a program that can be used by a...

    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...

  • The language is C++ for visual studio express 2013 for windows create a TicketManager class and...

    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...

  • I have to write a C program to assign seats on each flight of the airline’s...

    I have to write a C program to assign seats on each flight of the airline’s only plane (capacity: 40 seats, in 10 rows). For the sake of simplicity, assume that each row has 4 seats labeled A, B, C, D. Your program should display the following menu of alternatives: Please type 1 for "first class" Please type 2 for "business class" Please type 3 for “economy class”. If the person types 1, then your program should assign a seat...

  • P7.5– A theater seating chart is implemented as a two-dimensional array of ticket prices, like this:...

    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...

  • In C++. Write a program that can be used to assign seats for a commercial airplane...

    In C++. Write a program that can be used to assign seats for a commercial airplane and print out the ticket total. The airplane has 13 rows, with row 7 being the Emergency Exit row. Each row has 7 seats, there are two seats on each side of the plane and three seats in the middle with aisles on both sides. Rows 1 and 2 are considered first class with tickets for this specific  flight being $872.00 round trip. Rows 3...

  • Can I get help with adding the following to this code please? 1. When buying multiple...

    Can I get help with adding the following to this code please? 1. When buying multiple tickets, if one of the seats selected is already taken, give a message like "Sorry, one or more of the seats selected is already taken." and prompt the user to select the seats all over. (Or if possible to make it suggest a location where the seats are together that the user can select instead) 2. Print the total cost after all of the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT