1. Homepage
  2. Programming
  3. COMP90041 Programming and Software Development Final Project: Ticket Management System

COMP90041 Programming and Software Development Final Project: Ticket Management System

Engage in a Conversation
UnimelbCOMP90041Programming and Software DevelopmentJavaTicket Management System

Final Project - Ticket Management System Upgraded CourseNana.COM

Introduction CourseNana.COM

Welcome to the Final Project for COMP90041 - Programming and Software Development! CourseNana.COM

For this project, we will extend the ticket management system to a real-life Ticket Management System. In your real life, you may use some kind of database. But we will handle and save data using files. CourseNana.COM

Ticket Management System still has two types of Users - CourseNana.COM

Admin Operations - An admin can perform the following operations - CourseNana.COM

Customer Operations - A customer needs to select a concert to perform some actions. CourseNana.COM

Some of the operations are now removed from the previous assignments and there are a few new operations to perform by different kind of users. CourseNana.COM

File Handling & Command Line Args File Handling CourseNana.COM

Your program can launch in two modes - Customer mode or Admin mode. To run the program in any mode, it is important to read some data from the files and load them in the appropriate objects of classes (see guidance slide). There are atleast four or more files available to you. Four files that will always be present are mentioned below. These files are present in the assets folder. CourseNana.COM

Best Case Scenario: This section describes a real-life intended scenario. CourseNana.COM

  1. concert.csv - This file contains data for all the concerts in a comma-separated format. CourseNana.COM

  2. customer.csv - This file contains data for all the current customers in a comma- CourseNana.COM

separated format. CourseNana.COM

  1. bookings.csv - This file contains data for all the bookings made by all the customers in a comma-separated format. CourseNana.COM

  2. venue_default.txt - This file contains a default layout for venues. CourseNana.COM

Note that the file names may change. They are passed in specific order via the command line params. See the Command Line Arguments section below. You must not hardcode the file names in the code. CourseNana.COM

Venue Files - Venue files can change. They are not mandatory files except venue_default.txt mentioned above. When we test your code for assessment we may add/skip these files and some additional files. CourseNana.COM

  1. venue_mcg.txt - This file contains a layout for a venue that is specific to MCG(Melbourne Cricket Ground) CourseNana.COM

  2. venue_marvel.txt - This file contains a layout for the venue that is specific to Marvel Stadium. CourseNana.COM

Customer File
This file contains the following data in order CourseNana.COM

  • Customer ID - a unique ID to identify the customer CourseNana.COM

  • Customer name - Name of the customer (includes a space in case there is a First CourseNana.COM

    Name and a Last Name) CourseNana.COM

  • Password - a password that comprises of alphanumeric characters, @ and # symbols CourseNana.COM

Total Data Points: 3 fixed data points.
Concert File
This file contains the following data in order mentioned below. CourseNana.COM

  • Concert ID - uniquely identifies a concert CourseNana.COM

  • Concert date - a date on which the concert will be held CourseNana.COM

  • Timing - the start time of the concert in format HHMM(24-hour format) CourseNana.COM

  • Artist Name - the name of the artist CourseNana.COM

  • Venue Name - the name of the venue where the concert will be held CourseNana.COM

  • Zone Type with prices - There are three zones in a concert - VIP, SEATING, and STANDING. Each Zone has left, centre, and right sections of seats. For the STANDING zone, there are spots to stand instead of seats. But we will use the terms seats and spots interchangeably. This string describes the zone and its associated prices in the format ZONETYPE: LEFT SEAT PRICE: CENTRE SEAT PRICE: CourseNana.COM

RIGHT SEAT PRICE. For eg - VIP:359:499:399 means the zone type is VIP with the left section price set to AUD 359, centre section price set to AUD 499 and the right section price set to AUD 399. CourseNana.COM

Total Data Points: 8 fixed data points. CourseNana.COM

Booking File CourseNana.COM

The booking file contains bookings for all the concert for all the customers. The data follows the order - CourseNana.COM

  • Booking ID - uniquely identifies a booking within a concert. That is Concert 1 can only have one booking id as 1. But another concert, say Concert 2, can also have a booking ID set to 1. CourseNana.COM

  • Customer ID - cross-reference to the customer ID from the customer list CourseNana.COM

  • Customer Name - the name of the customer who has booked the concert CourseNana.COM

  • Concert ID - uniquely identifies the concert for which booking has been made CourseNana.COM

  • Total Tickets - total number of seats booked in the booking. For eg - 3 CourseNana.COM

  • Ticket Id - If 3 tickets(or seats) are booked then ticket Id will be 1/2/3. CourseNana.COM

  • Row number - The row number within a zone. This starts from 1. CourseNana.COM

  • Seat number - Within a row, the seat number which is booked. CourseNana.COM

  • Zone Type - VIP or STANDING or SEATING CourseNana.COM

  • Price - the price of the seat at the time of booking. Note that the price of the seat can be changed by admin. Thus it is important to save the price of the seat at the booking time. CourseNana.COM

Thus to derive an aisle number you will look at ZoneType and merge it with RowNumber. See the Venue File layout below for more details. CourseNana.COM

The last 5 data (Ticket Id to Price) repeat based on the Total Tickets booked. Thus for 2 tickets and 3 tickets booked the data may look like the following respectively. CourseNana.COM

4,2,John Doe,2,2,1,3,6,VIP,259,2,3,7,VIP,259 CourseNana.COM

1,1,Jane Doe,1,3,1,3,3,VIP,359,2,3,4,VIP,359,3,3,5,VIP,499 CourseNana.COM

Total fixed data points: 5 (Booking id, customer id, customer name, concert id, total tickets) CourseNana.COM

Total variable data points: multiples of 5 based on total tickets (Ticket id, row number, seat number, zone type, price) CourseNana.COM

Out of Scope Scenario: A line in the booking file will never have an incorrect concert ID or customer ID that does not exist in their respective files. CourseNana.COM

Venue File CourseNana.COM

The Venue is now marked with Aisle Numbers. The Aisle Numbers start from the letters V for VIP, S for SEATING and T for STANDING zones. The venue may look like this CourseNana.COM

V1 [1][2][3] [4][5] [6][7][8][9] V1 V2 [1][2][3] [4][5] [6][7][8][9] V2 V3 [1][2][3] [4][5] [6][7][8][9] V3 CourseNana.COM

S1 [1][2][3] [4][5] [6][7][8][9] S1 S2 [1][2][3] [4][5] [6][7][8][9] S2 S3 [1][2][3] [4][5] [6][7][8][9] S3 CourseNana.COM

T1 [1][2][3] [4][5] [6][7][8][9] T1 T2 [1][2][3] [4][5] [6][7][8][9] T2 T3 [1][2][3] [4][5] [6][7][8][9] T3 T4 [1][2][3] [4][5] [6][7][8][9] T4 CourseNana.COM

This means that there are 3 rows each for VIP (that starts with the initial V: V1 to V3) and SEATING (that starts with the initial S: S1 to S3) and 4 rows for STANDING(that starts with the initial T: T1 to T4). Each row has 3 seats in the left section, 2 seats in the middle section and 4 seats in the right section. CourseNana.COM

Worst Case Scenario: Your program may behave incorrectly if not handled explicitly. These inputs can be tested. CourseNana.COM

There will always be a venue_default.txt available to you. When you parse the concert.csv file if you see a venue name like MCG, you should look for a file venue_mcg.txt to load the venue. Similarly, if you see a venue name like abc you should look for a file venue_abc.txt. If you can not find the file venue_abc.txt or venue_mcg.txt you should load the venue layout from venue_default.txt file. CourseNana.COM

Note that the IDs (customer id/ concert id/ booking id) start from 1 as an index. You should take care when saving them in array/ArrayList as array indices start from 0. CourseNana.COM

Note that the files do not have a header describing the column names so you don't have to do special handling of the header vs the data. CourseNana.COM

Command Line Arguments CourseNana.COM

There is a set of command line arguments that should be passed to the program. Some of these parameters are optional. So you should take special care while handling these. The general format for the command line args is like this - CourseNana.COM

java TicketManagementEngine --admin|--customer [customer id] [customer password] customerFilePath CourseNana.COM

concertFilePath bookingFilePath [variable list of Venue Filepaths] CourseNana.COM

Note that the first param can be either --admin or --customer. The | signs represent or. The params in the [] means that they are optional. See the details below. CourseNana.COM

Admin Mode CourseNana.COM

Your code will have command-line arguments like this CourseNana.COM

$java TicketManagementEngine --
admin ../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt ../asset s/venue_marvel.txt
CourseNana.COM

  • the first param specifies the program is run in admin mode. CourseNana.COM

  • the second param is the path to the customer.csv file. CourseNana.COM

  • the third param is the path to concert.csv file CourseNana.COM

  • the fourth param is the path to bookings.csv CourseNana.COM

  • The fifth and sixth params are optional and represent venue file paths. There could be more venue file paths following these as well. This is a variable list of paths. CourseNana.COM

While the file name can change from bookings.csv to bookings_incorrect.csv to abc.csv as well, but the order will CourseNana.COM

remain the same - customer > concert > booking > variable list of venue files. You must not hardcode the file names in your program at all. CourseNana.COM

Note that venue_default.csv is not provided as a file path. You can assume (hard code or make it a constant in your code and set the default file path as assets/venue_default.txt). CourseNana.COM

Customer Mode CourseNana.COM

The customer mode follows a similar pattern however the second and third parameters can be optional. CourseNana.COM

$java TicketManagementEngine --customer 1
abc@1 ../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt
CourseNana.COM

  • the first param specifies the program is run in customer mode. CourseNana.COM

  • the second and third parameters are optional and represent customer id and CourseNana.COM

    password. CourseNana.COM

  • the fourth, fifth, and sixth params are file paths to customer.csv, concert.csv and CourseNana.COM

    bookings.csv. CourseNana.COM

  • the seventh param is again optional and represents venue file paths. There could be more venue file paths following the seventh param as well. CourseNana.COM

Worst Case Scenario: Your program may behave incorrectly if not handled explicitly. These inputs can be tested. CourseNana.COM

In case the second and third parameters are missing, your program command line args will look like this. CourseNana.COM

$java TicketManagementEngine --
customer ../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt
CourseNana.COM

You must handle the optional parameters appropriately. CourseNana.COM

In Edstem, this will be passed automatically. However, if you want to write code in your IDE, you must pass appropriate command line arguments. CourseNana.COM

When you quit the program, your program should write back any changes done to Bookings, Concert, and Customer back to the file path mentioned. Please do not override the Venue files. CourseNana.COM

IMPORTANT NOTE: Sometimes file handling is buffered internally by the operating system as well. This means if you PrintWriter.print , you may end up with an empty file. This can be an intermittent issue. To avoid this, please use .flush() methods. CourseNana.COM

Invalid User Mode
In case there is an invalid user mode provided, please print the error message and CourseNana.COM

terminate the program. CourseNana.COM

$ java TicketManagementEngine --
superuser ../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt ../a ssets/venue_marvel.txt
Invalid user mode. Terminating program now.
CourseNana.COM

Exception Handling with Files
Several exceptions may happen in the program. CourseNana.COM

Worst Case Scenario: Your program may behave incorrectly if not handled explicitly. These inputs can be tested. CourseNana.COM

1. FileNotFoundException or IOException - The file paths that are provided to you are not present in the directory. Or are unavailable for File read/write operations. In this case, Java raises FileNotFoundException or IOException. Your program should handle these correctly and terminate the program. For example - this is printed when the file for bookings doesn't exist. CourseNana.COM

../asets/bookings.csv (No such file or directory) CourseNana.COM

2. InvalidLineException - Every file expects a minimum number of fixed data points. When these data points are missing, you should raise an InvalidLineException, skip reading the line, print an error message and move onto the next line. This will only happen for concert.csv, customer.csv and bookings.csv. One of the following exception messages should be printed. CourseNana.COM

Invalid Concert Files. Skipping this line. Invalid booking Files. Skipping this line. Invalid Customer Files. Skipping this line. CourseNana.COM

3. InvalidFormatException - Some data points are rigid and some data points are flexible. For example, customer names can be anything. However, seat aisle numbers should either start from V/S/T. In such cases, you must raise an InvalidFormatException and skip reading the line, print an error message and move onto the next line. One of the following exception messages should be printed. CourseNana.COM

Booking Id is in incorrect format. Skipping this line. // This is printed when booking id is not numeric Customer Id is in incorrect format. Skipping this line. // This is printed when customer id is not numeric Concert Id is in incorrect format. Skipping this line. // This is printed when concert id is not numeric Incorrect Number of Tickets. Skipping this line. // This is printed when the total number of tickets is not numeric or 0 CourseNana.COM

Invalid Zone Type. Skipping this line. // when the aisle numbers in Venue does not starts with V/S/T CourseNana.COM

4. IncorrectPasswordException - When the customer id and password are passed from the command line params and they do not match as per the customers.csv, you should raise this exception, print the message and terminate the program. CourseNana.COM

Incorrect Password. Terminating Program CourseNana.COM

5. NotFoundException: If the customer id is not found in the customer.csv file raise this exception, print the message and terminate the program. CourseNana.COM

Customer does not exist. Terminating Program CourseNana.COM

Customer Main Menu CourseNana.COM

Customer Menu CourseNana.COM

Your program will run in customer mode when you provide the correct command line parameters. CourseNana.COM

Use Case 1: Customer mode with customer id and correct password CourseNana.COM

Best Case Scenario: This section describes a real-life intended scenario. CourseNana.COM

With the correct command line params (highlighted in bold below) you should print the welcome message as shown below. The password and customer id are present in the CourseNana.COM

customer.csv file and should match. Note that the welcome message shows the customer's name (highlighted in bold to differentiate, you don't have to make the output bold.). The customer's name is also present in the customer file. CourseNana.COM

$java TicketManagementEngine --customer 1
abc@1
../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt Welcome Trina Dey to Ticket Management System CourseNana.COM

________ ___ _____ |_ _| \/ |/ ___| |||. .|\`--. CourseNana.COM

| | | |\/| | `--. \ |||| ||/\__// \_/ \_| |_/\____/ CourseNana.COM

Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ----------------------------------------------------------------------------------------------------------
CourseNana.COM

----------------- CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- -----------------
>
CourseNana.COM

The customer mode always asks to select a concert for which they can perform different options. See the Select a concert section below. CourseNana.COM

Use Case 2: Customer mode with either incorrect customer id and incorrect password CourseNana.COM

Worst Case Scenario: Your program may behave incorrectly if not handled explicitly. These inputs can be tested. CourseNana.COM

When an incorrect password is passed, the program should terminate with the message shown in bold below. CourseNana.COM

$java TicketManagementEngine --customer 1
abc@1232
../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt ../as sets/venue_marvel.txt
Incorrect Password. Terminating Program CourseNana.COM

When an incorrect customer id is passed, the program should terminate with the message shown in bold below. CourseNana.COM

$java TicketManagementEngine --customer 100
abc@1232
../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt ../as sets/venue_marvel.txt
Customer does not exist. Terminating Program CourseNana.COM

Use Case 3: Customer mode with no customer id and password CourseNana.COM

Best Case Scenario: This section describes a real-life intended scenario. CourseNana.COM

If no customer id is provided in the command line params as shown below, then prompt the user to provide a name and password. CourseNana.COM

A customer id should be auto-generated. Read the last available customer id in customer.csv file, say 1, 2,3 is present in the file. So the last available customer id is 3. And then add 1 to generate the new customer id = 4 in this case. CourseNana.COM

When you quit the program, this customer should be appended in the customer.csv file as well. CourseNana.COM

Note that the welcome message shows the customer's name (highlighted in bold) CourseNana.COM

Enter your name: Jane Doe
Enter your password: abc#1234
Welcome
Jane Doe to Ticket Management System CourseNana.COM

________ ___ _____ |_ _| \/ |/ ___| |||. .|\`--. CourseNana.COM

| | | |\/| | `--. \ |||| ||/\__// \_/ \_| |_/\____/ CourseNana.COM

Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- -----------------
CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- CourseNana.COM

----------------- > CourseNana.COM

Concert Selection CourseNana.COM

Customers can perform various operations like booking seats, viewing booking details etc about a concert. After the welcome message, you must print a list of concerts to select from. The concerts can be loaded from the concert.csv file. The user will select a concert as per the id mentioned in the file. Once the user selects a concert, print the menu selection. CourseNana.COM

Out of Scope Scenario: The input to concert selection will either be the concert id or a 0. There won't be any invalid input here. CourseNana.COM

Welcome Trina Dey to Ticket Management System CourseNana.COM

________ ___ _____ |_ _| \/ |/ ___| |||. .|\`--. CourseNana.COM

| | | |\/| | `--. \ |||| ||/\__// \_/ \_| |_/\____/ CourseNana.COM

Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- -----------------
CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- -----------------
>
1
Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit > CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

If the user selects a 0 then you should terminate the program by printing the message Exiting customer mode. Please ensure that all the changes made to Concert/Bookings/Customers should be saved back to the files. CourseNana.COM

Welcome Trina Dey to Ticket Management System CourseNana.COM

________ ___ _____ |_ _| \/ |/ ___| |||. .|\`--. CourseNana.COM

| | | |\/| | `--. \ |||| ||/\__// \_/ \_| |_/\____/ CourseNana.COM

Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- -----------------
1 2024-10-01 Taylor Swift 1900 MCG 224 5 219
CourseNana.COM

2 2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 ---------------------------------------------------------------------------------------------------------- -----------------
>
0 CourseNana.COM

Exiting customer mode CourseNana.COM

Tip: Use the format string "%-5s%-15s%-15s%-15s%-30s%-15s%-15s%-15s%n" to show the concerts. CourseNana.COM

Option 1: Show Ticket Costs CourseNana.COM

After selecting the concert id, if the user selects option 1 then show them the cost of ticket prices based on the zone. Note that there are various zones present and within a CourseNana.COM

zone, the prices of seats in different sections can vary. These zones and prices come from the concert.csv file. CourseNana.COM

Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit >1 CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

---------- SEATING ---------- CourseNana.COM

Left Seats: 199.0
Center Seats: 199.0
Right Seats: 259.0 ------------------------------ ---------- STANDING ---------- Left Seats: 99.0
CourseNana.COM

Center Seats: 99.0
Right Seats: 149.0 ------------------------------ ---------- VIP ---------- Left Seats: 359.0
Center Seats: 359.0
Right Seats: 499.0 ------------------------------ Select an option to get started!
CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit > CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

Tip: Use the format string "---------- %8s ----------%n" to print the statements like ---------- VIP ---------- CourseNana.COM

Option 2: View Venue Layout CourseNana.COM

Customers can view the venue layout of the concert. A concert layout shows the available seats for the venue. The venue is loaded at the beginning of the program based on the venue name. See the FileHandling Slide again. The venue layouts do not have any bookings in the venue_xxx.txt files. However, when you read from the bookings.csv file, you should also show the booked seats to the customers while printing the venue layout, so that they don't book the already booked slides. X represents the booked seats in the venue layout. (See the bold highlighted texts. Note, you don't have to generate outputs in bold) CourseNana.COM

Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit >2 CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

V1 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] V1 V2 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] V2 V3 [1][2][X][X][X] [6][7][8][9][10][11] [12][13][14][15][16] V3 CourseNana.COM

S1 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S1 S2 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S2 S3 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S3 S4 [1][2][3][4][5] [6][X][X][9][10][11] [12][13][14][15][16] S4 S5 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S5 CourseNana.COM

T1 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T1 T2 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T2 T3 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T3 T4 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T4 T5 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T5 T6 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T6 Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit > CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

Option 3: Book Seats CourseNana.COM

In an actual booking system, you don't have to move around in the layout to select a seat. You can simply select using your mouse. However, in this case, we will use the keyboard. To book a seat you will print the layout first with the aisle numbers and seat numbers. You should also print the already booked seats marked with X. You should prompt the user to enter the aisle number, seat number and total number of seats to be booked. CourseNana.COM

Out of Scope Scenario: When mapping the booked seats from the bookings.csv to the venue layout, you will always find valid aisle and seat numbers. There won't be a file that has an invalid booking with an incorrect aisle and seat number that does not match the venue layout. CourseNana.COM

Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit >3 CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

V1 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] V1 V2 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] V2 V3 [1][2][X][X][X] [6][7][8][9][10][11] [12][13][14][15][16] V3 CourseNana.COM

S1 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S1 CourseNana.COM

S2 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S2 S3 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S3 S4 [1][2][3][4][5] [6][X][X][9][10][11] [12][13][14][15][16] S4 S5 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] S5 CourseNana.COM

T1 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T1 T2 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T2 T3 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T3 T4 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T4 T5 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T5 T6 [1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16] T6 Enter the aisle number: T1 CourseNana.COM

Enter the seat number: 5
Enter the number of seats to be booked: 4 Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit > CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

Once you have booked a seat(s), you should store it somewhere so that you can write the relevant data back to the bookings.csv when you exit the program. Take a look at the bookings.csv again to see what is the relevant information that gets stored. CourseNana.COM

How to generate booking id? CourseNana.COM

For the current concert and current customer find the maximum of the previous booking ids and simply add 1. CourseNana.COM

Out of Scope Scenario: Below scenarios are out of scope. CourseNana.COM

Not Enough Seats - Select the seat number say 15 and try to book 5 seats. CourseNana.COM

Option 4: View Booking Details CourseNana.COM

When you read the bookings.csv file, for the same customer different bookings from different concerts can be present. Since you have selected a concert to perform an CourseNana.COM

operation, when the customer wants to see booking details, you should show all the bookings that belong to the selected concert for this customer. If you created any bookings during the program run that were not previously present in the bookings.csv file, then that should be shown as well. This info has two parts - CourseNana.COM

1. A list of bookings showing the booking id, concert date, artist name, timing, venue name, seats booked and total price for all the seats booked. CourseNana.COM

2. For each booking there should be a ticket info printed. Each ticket info shows ticket id, aisle numbers, seat numbers, Seat Type and the price of the seats at the time of booking. Note that within a zone there are different sections with different prices, and hence price for each seat can vary. CourseNana.COM

Warning: Be extra cautious that you are showing booking details for the correct concert selected and for this specific customer only. As a customer, other customers should not be able to see your bookings or vice versa. CourseNana.COM

Select an option to get started! Press 1 to look at the ticket costs Press 2 to view seats layout
Press 3 to book seats
Press 4 to view booking details
CourseNana.COM

Press 5 to exit
>
4
Bookings ---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

Id Concert Date Artist Name Timing Venue Name Seats Booked Total Price ---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

  1. 1  2024-10-01 CourseNana.COM

  2. 2  2024-10-01 CourseNana.COM

  3. 3  2024-10-01 CourseNana.COM

---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

Taylor Swift Taylor Swift Taylor Swift CourseNana.COM

1900 MCG 3 1900 MCG 2 1900 MCG 4 CourseNana.COM

1217.0 518.0 396.0 CourseNana.COM

Ticket Info
############### Booking Id: 1 #################### Id Aisle Number Seat Number Seat Type Price ##################################################
CourseNana.COM

  1. 1  3 3 CourseNana.COM

  2. 2  3 4 CourseNana.COM

  3. 3  3 5 CourseNana.COM

################################################## CourseNana.COM

############### Booking Id: 2 #################### CourseNana.COM

VIP 359.0 VIP 359.0 VIP 499.0 CourseNana.COM

Id Aisle Number Seat Number Seat Type Price ################################################## CourseNana.COM

  1. 1  4 7 SEATING 259.0 CourseNana.COM

  2. 2  4 8 SEATING 259.0 CourseNana.COM

################################################## CourseNana.COM

############### Booking Id: 3 #################### Id Aisle Number Seat Number Seat Type Price ################################################## CourseNana.COM

  1. 1  1 5 CourseNana.COM

  2. 2  1 6 CourseNana.COM

  3. 3  1 7 CourseNana.COM

  4. 4  1 8 CourseNana.COM

################################################## CourseNana.COM

Select an option to get started! Press 1 to look at the ticket costs Press 2 to view seats layout
Press 3 to book seats
Press 4 to view booking details
CourseNana.COM

STANDING 99.0 STANDING 99.0 STANDING 99.0 STANDING 99.0 CourseNana.COM

Press 5 to exit > CourseNana.COM

Tip: Use the format string "%-5s%-15s%-15s%-10s%-15s%-15s%-10s%n" to print booking list and "%-5s%- 15s%-15s%-10s%-10s%n" to print the ticket info list. CourseNana.COM

If no booking is found for a concert, you should print an error message and return back to the menu. CourseNana.COM

Select an option to get started! Press 1 to look at the ticket costs Press 2 to view seats layout
Press 3 to book seats
CourseNana.COM

Press 4 to view booking details Press 5 to exit
>4
No Bookings found for this concert
CourseNana.COM

Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

> CourseNana.COM

Option 5: Exit CourseNana.COM

Exiting the concert menu only exits from the current concert and prints the concert selection again. You can proceed to perform operations with the same or other concerts or can choose to exit the program by selecting 0. See the Concert Selection at the beginning of this slide. CourseNana.COM

Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit >5 CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

Exiting this concert
Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left
CourseNana.COM

---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 9 215 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

> CourseNana.COM

Invalid Option CourseNana.COM

In case, someone provides an invalid input like -9 or 7, you should be able to print “Invalid Input” and prompt the user again with the menu to select a valid input again. Sample output CourseNana.COM

Select an option to get started! CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit >7 CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

Invalid Input
Select an option to get started!
CourseNana.COM

Press 1 to look Press 2 to view Press 3 to book Press 4 to view Press 5 to exit > CourseNana.COM

at the ticket costs seats layout
seats
booking details
CourseNana.COM

Admin Menu CourseNana.COM

Admin Menu CourseNana.COM

Your program will run in admin mode when you provide the correct command line parameters (highlighted in bold). CourseNana.COM

$java TicketManagementEngine --
admin
../assets/customer.csv ../assets/concert.csv ../assets/bookings.csv ../assets/venue_mcg.txt ../asset s/venue_marvel.txt CourseNana.COM

You should print the appropriate welcome message and show the menu options. CourseNana.COM

Welcome to Ticket Management System Admin Mode. CourseNana.COM

________ ___ _____ |_ _| \/ |/ ___| |||. .|\`--. CourseNana.COM

| | | |\/| | `--. \ |||| ||/\__// \_/ \_| |_/\____/ CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
CourseNana.COM

Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
CourseNana.COM

Option 1: View Concerts CourseNana.COM

Just like customers can see all the concerts, so can admin. You should load the concerts from the concert.csv file. CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert
Press 5 to exit
>
1 ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- -----------------
CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- -----------------
Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert
CourseNana.COM

Press 5 to exit > CourseNana.COM

Option 2: Update Ticket Costs CourseNana.COM

Admin can update the ticket costs. In this version, the admin must select a zone first before updating the prices for sections. CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details Press 2 to update the ticket costs Press 3 to view booking details
CourseNana.COM

Press 4 to view total payment received for a concert
Press 5 to exit
>
2
Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

1 2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

2 2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 ---------------------------------------------------------------------------------------------------------- -----------------
>
1 CourseNana.COM

---------- SEATING ---------- Left Seats: 199.0
Center Seats: 199.0
Right Seats: 259.0 ------------------------------ ---------- STANDING ---------- Left Seats: 99.0
CourseNana.COM

Center Seats: 99.0
Right Seats: 149.0 ------------------------------
---------- VIP ----------
Left Seats: 359.0
Center Seats: 359.0
Right Seats: 499.0 ------------------------------
Enter the zone : VIP, SEATING, STANDING:
SEATING Left zone price: 200 CourseNana.COM

Centre zone price: 225
Right zone price: 220
Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
CourseNana.COM

Option 3: View Bookings CourseNana.COM

Unlike customer, admin can see bookings for all the customers. However, they need to select a concert first. Just like customer, you should print the list of bookings first followed by ticket info for each booking id. CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
3 CourseNana.COM

Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- -----------------
CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- -----------------
>
1
Bookings ---------------------------------------------------------------------------------------------------------- -----------------
Id Concert Date Artist Name Timing Venue Name Seats Booked Total Price ---------------------------------------------------------------------------------------------------------- -----------------
CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 3 1217.0 CourseNana.COM

  2. 2  2024-10-01 Taylor Swift 1900 MCG 2 518.0 CourseNana.COM

---------------------------------------------------------------------------------------------------------- CourseNana.COM

----------------- CourseNana.COM

Ticket Info
############### Booking Id: 1 #################### Id Aisle Number Seat Number Seat Type Price ##################################################
CourseNana.COM

  1. 1  3 3 CourseNana.COM

  2. 2  3 4 CourseNana.COM

  3. 3  3 5 CourseNana.COM

################################################## CourseNana.COM

############### Booking Id: 2 #################### Id Aisle Number Seat Number Seat Type Price CourseNana.COM

VIP 359.0 VIP 359.0 VIP 499.0 CourseNana.COM

################################################## CourseNana.COM

  1. 1  4 7 SEATING 259.0 CourseNana.COM

  2. 2  4 8 SEATING 259.0 CourseNana.COM

################################################## CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert
CourseNana.COM

Press 5 to exit > CourseNana.COM

Tip: Use the format string "%-5s%-15s%-15s%-10s%-15s%-15s%-10s%n" to print booking list and "%-5s%- 15s%-15s%-10s%-10s%n" to print the ticket info list. CourseNana.COM

Option 4: Total Payment CourseNana.COM

For a selected concert id, admin can see the total payment received for the concert. This means for all the bookings for all the customers, you should sum up the price and show it. CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert
Press 5 to exit
>4
Select a concert or 0 to exit ---------------------------------------------------------------------------------------------------------- -----------------
CourseNana.COM

# Date Artist Name Timing Venue Name Total Seats Seats Booked Seats Left ---------------------------------------------------------------------------------------------------------- ----------------- CourseNana.COM

  1. 1  2024-10-01 Taylor Swift 1900 MCG 224 5 219 CourseNana.COM

  2. 2  2024-10-04 Taylor Swift 1900 MARVEL 143 5 138 CourseNana.COM

---------------------------------------------------------------------------------------------------------- -----------------
>
1
Total Price for this concert is AUD 1735.0
Select an option to get started!
Press 1 to view all the concert details
CourseNana.COM

CourseNana.COM

Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
CourseNana.COM

Option 5: Exit CourseNana.COM

Admin should exit the program by printing the exit message. Please ensure that all the changes made to Concert/Bookings/Customers should be saved back to the files. CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
5
Exiting admin mode CourseNana.COM

Invalid Option CourseNana.COM

In case, someone provides an invalid input like -9 or 7, you should be able to print “Invalid Input” and prompt the user again with the menu to select a valid input again. Sample output CourseNana.COM

Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
-9 CourseNana.COM

Invalid Input
Select an option to get started!
Press 1 to view all the concert details
Press 2 to update the ticket costs
Press 3 to view booking details
Press 4 to view total payment received for a concert Press 5 to exit
>
CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Unimelb代写,COMP90041代写,Programming and Software Development代写,Java代写,Ticket Management System代写,Unimelb代编,COMP90041代编,Programming and Software Development代编,Java代编,Ticket Management System代编,Unimelb代考,COMP90041代考,Programming and Software Development代考,Java代考,Ticket Management System代考,Unimelbhelp,COMP90041help,Programming and Software Developmenthelp,Javahelp,Ticket Management Systemhelp,Unimelb作业代写,COMP90041作业代写,Programming and Software Development作业代写,Java作业代写,Ticket Management System作业代写,Unimelb编程代写,COMP90041编程代写,Programming and Software Development编程代写,Java编程代写,Ticket Management System编程代写,Unimelbprogramming help,COMP90041programming help,Programming and Software Developmentprogramming help,Javaprogramming help,Ticket Management Systemprogramming help,Unimelbassignment help,COMP90041assignment help,Programming and Software Developmentassignment help,Javaassignment help,Ticket Management Systemassignment help,Unimelbsolution,COMP90041solution,Programming and Software Developmentsolution,Javasolution,Ticket Management Systemsolution,