0% found this document useful (0 votes)
30 views

Assignment 2 - Ticket Management System Extended

Uploaded by

thariyarox1512
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Assignment 2 - Ticket Management System Extended

Uploaded by

thariyarox1512
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Assignment 2 - Ticket Management System

Extended

Introduction
Welcome to the second assignment for COMP90041 - Programming and Software Development! See
a brief introductory video here.

An error occurred.

Try watching this video on www.youtube.com, or enable JavaScript if it is


disabled in your browser.

For this project, we will extend the ticket management system.

Ticket Management System now has two types of Users -

Admin - who can manage the concerts and prices


Customer - who can book tickets for the concerts.

Admin Operations - An admin can perform the following operations -

Admin can view all the concerts


Admin can add a concert
Admin can remove a concert
Admin can view prices for seats for a concert and update them
Admin can see the seat layouts

Customer Operations - A customer can perform all the operations that were allowed in the
previous assignment and some more -

Customers can view all the concerts (Similar to Assignment 1)


Customers can view the prices for the concert seats (Similar to Assignment 1 with slight
modifications)
Customers can see the seat layouts (Similar to Assignment 1 with slight modifications)
Customers can book multiple seats now
Customers can see how much to pay for all the seats booked.

Due to the change in specifications and operations performed, there are certain changes introduced
to Concert and Seats as well

the total capacity for concerts can be set based on seat layout at the beginning
seat capacity decreases with more tickets booked

For simplicity, all concert has the same venue layout despite they are at different locations. This
means that if there are 3 concerts, there should be 3 venues as the seats booked will be different in
each one but the layout will remain the same for all three of them for sake of simplicity.
Preamble: "The Specifications"
The slides from this lesson module for the assignment act as "the specifications" for the system we
are about to build.

"The specifications" in real-life software development is the document that details the features that
should be implemented in any particular project. They are the features and requirements that you,
the Software Developer, and the client have agreed should be implemented in the system.

As such, you should read these specifications carefully and ensure that your program implements the
requirements of the specification correctly.

Tests will be run on your program to check that you have implemented these specifications correctly.
Note that for Assignment 2, we will provide 10 visible tests that you can run to check that the basic
functionality of your system is correct. However, there will also be 10 hidden (i.e., invisible) tests that
we will run when assessing the correctness of your code. So once your program passes the basic
tests, we strongly recommend that you perform further tests yourself, to ensure that the required
features have been implemented correctly.

How to read the specifications?

Some of the specifications will be referred back from Assignment 1. This will be notified using a
green strip as shown below -

Carried Forward: This section is referred as is from Assignment 1

Other specifications can be referred from Assignment 1 with slight modifications. This will be
notified using a yellow strip

Modifications: This section is referred from Assignment 1 with slight modifications

New additions to the assignment will be marked using blue callouts like below-

Addition: This specification is entirely new to Assignment 2.

Lastly, sometimes a developer thinks exhaustively and engages in continuous discussion with
people to gather more information. We try to keep certain use cases out of scope as they bring
more complexity to the system. Some advanced developers can cope through it but we would
like to keep some things simpler for beginners. Please read carefully through the out-of-scope
specifications as well. This may be embedded as a red strip in the specifications sometimes.

Out of Scope Scenario: This scenario ........ is out of scope for this assignment
Other than this, we will use the general informational, warning, error, and assumption callouts
using blue, yellow, red, and green coloured callouts.
Also, note that the code snippets have some characters in bold that represent the inputs to the
program.

Students can assume that test cases only contain outputs that are explicitly part of specifications. The test
cases, visible or hidden, do not produce any output that is not mentioned in the specifications explicitly. Please
note that the specifications will give you warnings and important notes where we expect special input
handling. You should observe those and implement them accordingly as they will be tested while marking your
program.
Preamble: Intended Learning Outcomes
The Intended Learning Outcomes for this Assignment are mentioned below -

Control Flows - use branching and looping to navigate the special use cases in specifications.
Classes - identify the entities and encapsulate their data and actions together in a class.
Static Variables & Methods - identify and implement a use case that can be solved using static
variables and methods
Arrays - to use 1D and 2D arrays and perform associated operations
Packages - identify and group logical entities(classes) together
Javadoc - generate javadocs from comments used in classes
Inheritance - implement polymorphism correctly as per the scaffold code provided.

ArrayLists are prohibited. In Assignment 2, we want to test your ability to work with array, array
indices and adding and removing items from an array. ArrayLists provide all these capabilities out of
the box and hence are prohibited from use in this assignment. ArrayLists and other Collections types
will be covered in the next assignment.

A warning to those who have previous programming experience in other programming languages (like C or
Python) that follow a procedural programming paradigm: Be careful to develop your program using object-
oriented principles, as programming and structuring your code in a way that is not object-oriented is an easy
way to lose marks for structure in the assignments.
Preamble: Structure and Style
We will also be assessing your code for good structure and style.

Use methods when appropriate to simplify your code, and avoid duplicate code.

Use correct Java naming conventions for class names, variable names, and method names and
put them in a well-organised way in your code i.e. it should be readable as well. Look at the
conventions provided by Oracle here.

Code structure in a file is very important and improves readability. Look at the code organisation
conventions provided by Oracle here.

Make sure the names you choose are meaningful, to improve the readability of your code.

Ensure to add meaningful comments in between your code and Javadoc comments for classes and
methods.

We will provide a marking scheme to help guide you in the development of your program.
Academic Honesty �
All assessment items (assignments, tests, and exams) must be your own, individual, original
work.
Any code that is submitted for assessment will be automatically compared against other
students' code and other code sources using sophisticated similarity-checking software.
Cases of potential copying or submitting code that is not your own may lead to a formal
academic misconduct hearing.
Potential penalties can include getting zero for the project, failing the subject, or even expulsion
from the university in extreme cases.
For further information, please see the university's Academic Honesty and Plagiarism website,
or ask your lecturer.
Main Program Execution
Your main program has slightly changed. Below are the specifications of how your program will be
run initially.

Carried Forward: The section mentioned below is same as Assignment 1. Refer to the slides here

Inputs

Your program must take command line inputs in the order mentioned below.

Rows - total number of rows for the seats. In this example, it is 5.


Left column - total number of seats present in the left column. In this case, it is 4.
Middle column - total number of seats present in the middle column. In this example, it is 5.
Right column - total number of seats present in the right column. In this example, it is 4.

This means when you compile your program and run it, the command on the terminal should look
like this

javac TicketManagementEngine.java
java TicketManagementEngine 5 4 5 4

In case there are insufficient inputs (missing input) or if any of the input is 0 or negative, then exit the
program by printing the error message -

javac TicketManagementEngine.java
java TicketManagementEngine 5 4 5
Invalid Inputs to set layout. Exiting the program now.

Note that in Assignment 1 the display message was being printed before the Invalid Inputs error
message. But this is fixed now in Assignment 2. Please change your code accordingly.

To start with the Ticket Management System, you will need to print the display message. This part of
the code is already provided to you. You must not remove this from the files.

Welcome to a revised version of Taylor Swift's Eras tour.

_____ _____ ________ ___ _____


| ___| |_ _| |_ _| \/ |/ ___|
| |__ _ __ __ _ ___ | | ___ _ _ _ __ | | | . . |\ `--.
| __| '__/ _` / __| | |/ _ \| | | | '__| | | | |\/| | `--. \
| |__| | | (_| \__ \ | | (_) | |_| | | | | | | | |/\__/ /
\____/_| \__,_|___/ \_/\___/ \__,_|_| \_/ \_| |_/\____/
Modifications: Below section has slightly changed from Assignment 1.

Our program must run in either Customer Mode or Admin Mode. Our main menu has changed to the
following :

Welcome to a revised version of Taylor Swift's Eras tour.

_____ _____ ________ ___ _____


| ___| |_ _| |_ _| \/ |/ ___|
| |__ _ __ __ _ ___ | | ___ _ _ _ __ | | | . . |\ `--.
| __| '__/ _` / __| | |/ _ \| | | | '__| | | | |\/| | `--. \
| |__| | | (_| \__ \ | | (_) | |_| | | | | | | | |/\__/ /
\____/_| \__,_|___/ \_/\___/ \__,_|_| \_/ \_| |_/\____/

Select an option to get started!


Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
>

Once the user has selected either Customer mode or Admin mode we will show them their respective
menu so they can choose the operations available to them.

Exit Option
In case, the user selects option 3, you must gracefully quit the program and print a goodbye message.
Look at the complete output below.

Select an option to get started!


Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
> 3
Goodbye from the Ticket Management System! See you next time!

Invalid Command
In case, someone provides an invalid input like 4 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

Welcome to a revised version of Taylor Swift's Eras tour.

_____ _____ ________ ___ _____


| ___| |_ _| |_ _| \/ |/ ___|
| |__ _ __ __ _ ___ | | ___ _ _ _ __ | | | . . |\ `--.
| __| '__/ _` / __| | |/ _ \| | | | '__| | | | |\/| | `--. \
| |__| | | (_| \__ \ | | (_) | |_| | | | | | | | |/\__/ /
\____/_| \__,_|___/ \_/\___/ \__,_|_| \_/ \_| |_/\____/

Select an option to get started!


Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
> 4
Invalid Input.
Select an option to get started!
Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
>

Out Of Scope: Note that we only expect integers as input to this menu. There can be invalid integers that you
need to handle, but there won't be any exceptions due to String/double or any other data type mismatch
input provided to your program.
Customer Main Menu

Customer Main Menu


Modifications: There are additional menu items as compared to Assignment 1.

Once the user has chosen customer mode, we should show a slightly modified version of the menu
that we have shown in Assignment 1. The first 4 menu items remain the same as in Assignment 1.
There is an addition of menu item 5 and the exit option is now changed to menu item 6.

Select an option to get started!


Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
> 1
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Option 1: Show timings


Modifications : There are additional data points in show timings. You cannot hardcode this anymore as there
are few other changes.

If the user selects option 1, you must show the below details to the user.

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 1
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Use the formatted input with settings "%-5s%-15s%-15s%-15s%-30s%-15s%-15s%-15s\n" to print the


output in a nice format.

Assumption: For option 2,3,4,5 whenever we need to select a concert to do a further action, the input for
selecting the concert will always be correct ie in the above case either the concert selected would be 1 or 2 but
never 3.

Things to note -

1. Notice that there are two additional columns - Seats Booked and Seats Left.
2. The Total Seats are now set based on the Venue Layout input you have taken from the
command line. In this example, the command line arguments were 5 4 5 4 which means we
have 5 rows and total seats per row as 4+5+4 = 13 . Total seats for the venue are 13 x 5 = 65
as shown in the above output.
3. Every time a seat is booked, Seats booked should be increased and Seats Left can thus be
derived from Total Seats - Seats booked.
4. Admin can add more concerts, so you must not hard code anything and handle it accordingly.
See more in the Admin Section.
5. You must preload two concert details at the beginning of your program. See here.

See how the booked seats changes in the output below -

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 1
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 2
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 1
-------------------------------------------------------------------------------------------------------
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Option 2: Ticket Costs


Modifications : Prices of sections are not constant anymore. They are dynamic and set by the Admin. Also,
ticket costs for different concerts can be different.

Your seat layout is divided into three sections - Left, Middle, and Right. Ticket cost varies as per the
sections. This was discussed in the previous Assignment. However, the prices of seats can vary for
different concerts. When the user selects input 2 from the main menu, you must ask the customer
which concert they want to see the prices for and then show the prices for those concert seats
accordingly.

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 2
Enter the concert number to see the prices for the seats
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
> 1
Seat Costs
-----------------------
Left Zone: AUD 200.0
Right Zone: AUD 250.0
Middle Zone: AUD 500.0
-----------------------
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Note that if we choose concert 2 a different price will be shown. If the admin chooses to update the price of a
concert, the prices will change and they should reflect correctly the next time the customer wants to see the
price.

Option 3: Seats Layout


Modifications: The seat layout is created and printed the same way as Assignment 1. Refer to the details here
for symbols used. However, different concerts have different booked seats.

When the user selects option 3 from the main menu you must ask the customer which concert's seat
layout they want to see. Different concerts can have different bookings. Print the seat layout per the
seat settings provided as input in the command line arguments and seats that have already been
booked. Look how show timings also show the changes in Seats Booked and Seats Left.

See the output below if we choose Concert 1-

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 3
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 2
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 1
-------------------------------------------------------------------------------------------------------
> 1
[BB__ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

See the output below if we choose Concert 2

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 3
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 2
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 1
-------------------------------------------------------------------------------------------------------
> 2
[____ _B___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Initially, when no booking is made, the seats are empty as mentioned in Assignment 1.

Option 6: Exit
Modifications : Do not exit from the entire program.

When you exit from the customer menu, you do not exit from the program. However, you must go
back to choosing customer or admin mode. The program can continue to switch to admin mode or
reselect the customer mode. All the changes made in a session remain available for other sessions. If
a concert is added or prices are updated by an Admin, they must be visible to customer if we switch
from admin mode to customer mode. See the output below
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 6
Exiting Customer Mode
Select an option to get started!
Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
>
Book Tickets & Prices

Modifications: Three major changes. First, you need to select the concert for which the seat is booked.
Second, you need to select X to book the seat and continue with the other seat selection. Third, The menu for
W/A/S/D/Q is now changed into one single statement.

Once the user selects option 4 to book the tickets we must allow them to select a concert before they
can select a seat. You can then prompt the user with a menu to move around the seating selection.

To select a seat you may need to move around the layout and mark your seat. The cursor is marked
by X. A seat booked is marked by B. As you move around the seat layout, the X moves.

Look at the sample output below -

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 4
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
> 1
Continue to the seat selection!
You can select the seat that are empty and marked by _
[X___ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
>

Tip: in this case you will expect a String input - w/a/s/d/q/z. This can be upper or lower case. You must
handle the input accordingly.

By default, the leftmost available seat is pre-selected. If the leftmost seat is booked, the next available
leftmost seat is available. Look at the output below.
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 4
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 1
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
> 1
Continue to the seat selection!
You can select the seat that are empty and marked by _
[BX__ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
>

Carried Forward: Below section is same as Assignment 1. Refer to the slides here

The following movements are the same as per Assignment 1 Specs.

Invalid Input
Movement - Right/Left/Top/Bottom
Invalid Moves
Special Moves
Exiting from Seat Selection - The selected seat is now marked with B instead of X.

Booking Multiple Seats

Modifications: Select a seat for booking. Option Z in the menu.

Since the customer can book multiple seats, and the cursor X can now move around to book other
seats, we need to select the seat the customer wants to book. To select a seat, we will use option Z.
Once a seat is booked, the seat is marked by B. The cursor then moves to the next available seat.
Customers can then navigate around to book more seats. See the output below -

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 4
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 1
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
> 1
Continue to the seat selection!
You can select the seat that are empty and marked by _
[BX__ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> d
[B_X_ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> d
[B__X _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> s
[B___ _____ ____]
[___X _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> z
[B___ _____ ____]
[___B X____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> d
[B___ _____ ____]
[___B _X___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> z
[B___ _____ ____]
[___B _BX__ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> q
Your seat selection is saved.
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Prices
Addition: This specification is entirely new to Assignment 2.

When the user selects menu item 5, you must find all the seats booked for a concert and then find
the total pricing of the booked seats per the prices for different seating zones (Left/Middle/Right). For
example, for the seats booked in the previous section,

[B___ _____ ____]


[___B _B___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]

the price is calculated as 2 x left zone price for concert 1 (ie 200) + 1 for the middle zone price for
concert 2 (ie 500). = 2 x 200 + 500 = 900. See the output below -

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 5
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 3
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
> 1
Total price for all the booked seats is AUD 900.00
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

If a concert is selected where no booking has been made simply show the error message - No
bookings made for this concert

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 5
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 32 3
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 32 0
-------------------------------------------------------------------------------------------------------
> 2
No bookings made for this concert
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>
Special Cases : Seat Movements and Selection Use Cases.

Valid Seat Movements


1. If a user does not select any seat and exits the menu and comes back - the left-most available seat
should be selected.

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 4
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 2
-------------------------------------------------------------------------------------------------------
> 1
Continue to the seat selection!
You can select the seat that are empty and marked by _
[X___ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> q
Your seat selection is saved.
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 4
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 2
-------------------------------------------------------------------------------------------------------
> 1
Continue to the seat selection!
You can select the seat that are empty and marked by _
[X___ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
>

2. If a seat is booked already and the user comes back to select more seats - the left most available
seat should be selected.

Select an option to get started!


Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 4
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 2
-------------------------------------------------------------------------------------------------------
> 2
Continue to the seat selection!
You can select the seat that are empty and marked by _
[BBX_ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
>

Out of Scope Seat Movements


Out of Scope: Use cases that are not tested and are out of scope because they are complex to implement in
the assignment.

1. If an entire row is booked, where should be the marker X? Perhaps the next row. But this won't be
tested.

2. If a seat is booked and then a few seats later another seat is booked and you are navigating right to
left or left to right in the same row.

3. If a seat is booked in the middle of rows and you are moving up to down or down to up.

4. When booking seats, if you are booking the bottom right seat, there is no place where the cursor X
can go next. Thus, this case is not tested.

5. Also, with booking a seat, if the seat to be booked is to the immediate left of another seat, X skip
the seat on the right to get to the next available seat. This is complicated to implement and won't be
tested.

For use cases 2 and 3 your code may produce incorrect output like this if not carefully implemented
and hence they are out of scope. See the Booked seat in the middle section is overwritten by marker
X.

[BB__ _BX__ ____]


[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> s
[BB__ _B___ ____]
[____ __X__ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> a
[BB__ _B___ ____]
[____ _X___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> a
[BB__ _B___ ____]
[____ X____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> w
[BB__ XB___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
> d
[BB__ _X___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Press W/S/A/D to move up/down/left/right. Press Z to select, Q to quit.
>
Preload Concerts

PreLoad Data for Concerts


When your program starts, you need to preload some data for concerts. You must add two concerts
manually. The concert details are shown below -

-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------

Remember, the total seats are set by venue layout.

For the prices for the seat, pre-load the prices as -

For Concert 1

Left - 200
Middle - 500
Right - 250

For Concert 2

Left - 100
Middle - 300
Right - 150

How do you load the data?

Well, think of Object Oriented Programming. You must create some classes and instances of those
classes and use some kind of print statements to print the data from those instance variables' getters.
To set the data you invoke the setters.

More guidance on this can be found here.

Out of Scope: You don't have to validate the date times are correct. They are just treated as strings. We will
pass the correct format as yyyy-MM-dd and HHmm-HHmm as inputs to your program.
Admin Menu

Addition: This specification is entirely new to Assignment 2.

For admin there are fairly simple tasks to perform like -

admin can view the concerts (same as Option 1 of the customer menu)
admin can add a concerts
admin can remove a concert if no booking has been made for that concert
admin can view the costs of the seats for a concert (same as Option 2 of the customer menu)
admin can change the price of the seat sections
admin can look at the seat layouts with bookings (same as Option 3 of the customer menu)

If the user selects the Admin mode, you must print the below menu as output -

Select an option to get started!


Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
> 2
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
>

Option 1:
Same as customer mode Option 1

Option 4:
Same as customer mode Option 2

Option 6:
Same as customer mode Option 3
Option 7:
Same as customer mode but the message is changed to Exiting Admin mode. See output below -

Select an option to get started!


Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 7
Exiting Admin Mode
Select an option to get started!
Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
>

Option 2:
When the admin selects option 2 they should be able to add a concert. They must take all the details
for the concert as inputs. Note that the total seats remain the same as the venue layout is set by
command line parameters. And seats booked are set to 0 initially but are dynamically changed when
the customer books a seat. See the program output below -

Select an option to get started!


Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 2
To add a new concert please enter the details:
Date: 2024-09-01
Timing: 1900-2100
Artist Name: Ed Shereen
Venue: MCG
Left zone price: 300
Middle zone price: 300.0
Right zone price: 300
New concert added successfully.
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
>

You should show this concert added to the admin and customer if they choose option 1 now. Look at
the output below -

New concert added successfully.


Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 1
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 3
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
3 2024-09-01 Ed Shereen 1900-2100 MCG 65 0
-------------------------------------------------------------------------------------------------------
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
>

Assumption: For options 3,4,5,6 whenever we need to select a concert to do a further action, the input for
selecting the concert will always be correct i.e. in the above example either the concert selected would be 1,2,
or 3 but never 4.

Option 3:
Admin can remove a concert if no booking has been made for that concert. But if a booking is made
already, then admin should not be able to remove the concert and an error must be shown. To
remove a concert you must show all the concert details to the admin and ask which concert to
remove. See the program output below.

Select an option to get started!


Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 3
Select a concert that you want to remove.
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
3 2023-07-01 Ed Shereen 1900-2100 MCG 65 0
-------------------------------------------------------------------------------------------------------
> 3
Concert removed successfully.
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 1
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
-------------------------------------------------------------------------------------------------------
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
>

In case a booking is already made then you should show the error - Concert cannot be removed as
tickets are booked for this concert.

Select an option to get started!


Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 3
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 0
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 2
-------------------------------------------------------------------------------------------------------
> 2
Concert cannot be removed as tickets are booked for this concert.
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
>

Option 5:
If the admin wants to update the price of seats for any concert using option 5, you must ask them to
choose a concert and then ask them the prices of all three zones. Look at the output below

Select an option to get started!


Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 5
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 3
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
3 2024-09-01 Ed Shereen 1900-2100 MCG 65 0
-------------------------------------------------------------------------------------------------------
> 1
Enter the price details
Left zone price: 100
Middle zone price: 100
Right zone price: 100
Price updated successfully.
Select an option to get started!
Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
>

Note that the admin can change the prices of seats for a concert where the booking has already been
made. In that case, if the prices change the customer should see the updated final price for the seats
booked. See the output below that the previous price changed from 900 to 300 now.

Select an option to get started!


Press 1 to look at the concert timings
Press 2 to add a concert
Press 3 to remove a concert
Press 4 to look at the ticket costs
Press 5 to update the ticket costs for a concert
Press 6 to view the layout of the concert
Press 7 to exit
> 7
Exiting Admin Mode
Select an option to get started!
Press 1 to enter Customer mode
Press 2 to enter Admin mode
Press 3 to exit
> 1
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 3
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 3
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
3 2024-09-01 Ed Shereen 1900-2100 MCG 65 0
-------------------------------------------------------------------------------------------------------
> 1
[B___ _____ ____]
[___B _B___ ____]
[____ _____ ____]
[____ _____ ____]
[____ _____ ____]
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
> 5
Select a concert that's price needs to be updated
Show Timings
-------------------------------------------------------------------------------------------------------
# Date Artist Name Timing Venue Name Total Seats Seats Bo
-------------------------------------------------------------------------------------------------------
1 2023-07-01 Taylor Swift 1700-1900 Melbourne Cricket Ground 65 3
2 2023-07-02 Taylor Swift 1900-2100 Marvel Stadium 65 0
3 2024-09-01 Ed Shereen 1900-2100 MCG 65 0
-------------------------------------------------------------------------------------------------------
> 1
Total price for all the booked seats is AUD 300.00
Select an option to get started!
Press 1 to look at the show timings
Press 2 to look at the ticket costs
Press 3 to view the layout of the concert
Press 4 to book seats
Press 5 to see the price for selected seats
Press 6 to exit
>

Out of scope: In real world scenario, the prices of the tickets booked doesn't change. To do such an
implementation we need to extend our program to an even complex structure. For sake of simplicity, this is
out of scope. Thus the prices of the seats booked changes as per the current price set for the seats.
Guidance: Object Oriented Programming

Think Object Oriented Programming, Think Classes!


To assist you with writing some code, some empty files with comments are mentioned. You can find
the description below about how to think from an Object Oriented Programming approach and which
classes should be created.

Venue: Venue Class should hold some array that represents the layout of the seats. You can
add additional data fields to this. You must write some operations that modify these seats - like
navigating up/down/left/right through the seats, booking the seats, etc.
Concert: Since total seats are no longer a constant, you need to set the total seats of these
concerts along with other concert details somewhere. Use the concert class here. Write some
other data fields and methods about how to access or change them.
ConcertDetails: Since there is more than one concert, you would need a class to manage all of
these concerts together. Use the ConcertDetails class to hold all the information about the
concerts together. Add some methods to add or update the concerts.

Please note that in Object Oriented Programming, we try to abstract out code into many
classes that make logical sense. Creating one God-Like Class is a paradigm we avoid. Read
more about God Classes here.

Inheritance
We will assist you in writing your first inheritance-based classes. Inheritance should be used when
you can find a similar group of entities. Can you think of any similar group of entities here? Perhaps
different Users like Admin and Customer. Do they have any similarities and dissimilarities that you
can manage using inheritance?

One of the common properties of these two is that both have a menu to show, but they are slightly
different. To assist you in dealing with abstract classes, we have created an abstract method in
User.java. Here are the do's, don'ts and must's -

Do's

You can modify the method signature provided to you by adding/removing parameters to the
method.
You can add more methods to the abstract class that you think are common between customer
and admin
You can add more data fields to the abstract class
Don'ts

Don't change the method name


Don't remove the abstract method from the class

Must's

As part of your assignment, you must implement this abstract class by creating two classes by
yourself, namely, Customer and Admin that extend this class
You must use this User/Customer/Admin class somewhere in your code and invoke appropriate
methods.

Packages
You should group the logical entities in packages. One suggestion is to group the
user/customer/admin into a package. These packages are not created for you and we recommend
you move the provided classes to necessary packages. Can you think of anything else?

JavaDoc
You must annotate your classes and methods using javadoc style comments. How to create javadoc.

Tasks for you to think about


Where do you think seat prices should be saved?
How and where will you save the number of seats booked?
Can you think about any data from the entire specifications that feels static? Remember static is
different from constants. Static stays the same for all the classes but the value of static variables
can be set at the program run time. Constants remain hardcoded in the code.
Ticket Management System Extended
The starter code have been provided for you. Some classes are provided but packages are not
created. You must create some packages and move the classes to the appropriate package except
TicketManagementEngine.java. TicketManagementEngine.java should not be moved under
any package else your code won't run. Write the rest of the code to implement your program
there �

We also provided some tests for your code, which will run automatically every time you hit "Mark".
You can run these tests as many times as you would like until the submission deadline.

Submission will close on 29 April 2024 at 0900 AEST.

Happy coding!
Assessment
This project is worth 15% of the total marks for the subject. Your Java program will be assessed based
on the correctness of the output as well as the quality of code implementation.

Automatic tests will be conducted on your program by compiling, running, and comparing your
outputs for several test cases with generated expected outputs. The automatic test will deem your
output wrong if your output does not match the expected output, even if the difference is just having
extra space or missing a colon. Therefore, it is crucial that your output follows exactly the same
format shown in the provided examples.

Passing the tests we provide here on edstem does not mean you will score full marks. Each submission will
further be subject to hidden tests as well as manual inspection by our teaching team.
Marking Scheme �

Warning! You must make sure your code runs on edstem. If your code does not compile on edstem, 0
marks will be given.

COMP90041 Assignment 2: Marking Scheme


Student: [Student ID goes here]

Program Presentation
Including layout and style, readability, adherence to coding expectations and conventions, general
care and appearance. The full marks for this section of marking is 4.

Gaining marks

Gain 0.5 marks for any of the achievements listed below.

all choices of variable (except array indices), and method names were meaningful;
variable, method, and class names follow Java convention (camelCase and PascalCase);
Constant names follow Java convention (UPPER_SNAKE_CASE);
comments were sufficient and meaningful;
consistent bracket placement and indentation;
authorship statement (name, university email, student number) provided;
all magic numbers (essentially numbers other than 0 or 1) were assigned to constants; repeated
Strings are created as constants
clearly structured code with the correct order of variables, constructors, getters/setters, and
methods.

Deductions

stylistic issue, if major 1.0 mark per issue; if minor, 0.5 mark per issue. The minimum mark in
this section can be 0.

Total marks for this section: / 4

Other comments from marker: [Comments go here]

Structure and Approach


Including decomposition into methods, declaration of instance variables at the appropriate locations,
and choice of parameters to methods.

The full mark for this section of marking is 11.

Gaining marks

Gain 1 mark for any achievement listed below.

Good use of methods; No methods were too long or too complex;


code was not duplicated (tasks to be done in more than one place are in the method);
no more than 3 static methods (including main) were used -- most methods should be bound
to objects;
no more than 4 static variables were used -- most variables should be non-static (" final
static " constants are not variables); Must use at least one static variable as per
specifications.
appropriate use of encapsulation; limiting the scope of variables to private or protected
except where reasonable justification is given. No privacy leaks are present.
constants were defined as final static ;
appropriate use of Arrays, creating 1D and 2D arrays wherever appropriate.
classes were implemented using inheritance relationships where appropriate; inheritance was
invoked appropriately
Whether classes have high cohesion or low coupling ie appropriate methods are placed in
appropriate classes.
JavaDoc has been generated appropriately without any warnings.
At least 2 packages have been created to group the related classes.

Deductions

structural issues, if major 2.0 marks per issue, otherwise 1.0 per issue. The minimum mark in
this section can be 0.

Total marks for this section: / 11

Other comments from marker: [Comments go here]

Program Execution
Including compilation, execution of test data, output presentation, and readability.

Programs that do not compile in the test environment will lose all marks in this section. Be sure to
verify your submission and check the output before you say "finished" to yourself.
The full mark for this section of marking is 15.

Marks awarded

Gain 0.75 marks per test case passed.

Deductions

Gain 0.5 marks for tests with slightly different output (e.g., small changes in whitespace/newline are
fine but a lot of white spaces or new line skipped may be an issue; if the marker says the difference is
not slight, that is final. This should not occur if the available test cases are all checked. White space
issues in visible test cases will be penalised);

Gain 0 for other failed tests

Visible tests passed: / 13

Hidden tests passed: / 7

Total tests passed: /20

Total marks for this section: / 15

Total Marks for the Assignment: / 30

Overall comments from marker: [Comments go here]

Assignment Marker: [Assignment marker name goes here]

If you have any questions regarding your mark, please contact the lecturers
Submission
Your submission should have the Java classes already provided to you and additional classes if you
wish to include them. Your submission should also contain some packages.

Rearrange the classes to create some packages and update the import statements accordingly.

A starter code has been provided to you here on the edstem platform, but you are welcome to
develop the project outside of the edstem environment, using your own IDEs.

Submission is made via edstem, however, and will be whatever code is saved on the Code
Challenge when the project deadline closes.

Your code MUST compile and run here on edstem. If your code does not compile we cannot mark it and you
risk getting 0 marks.

“I can’t get my code to work on edstem but it worked on my local machine” is not an acceptable excuse
for late submissions. In addition, submissions via email will not be accepted.

Be sure to copy your code into your Code Challenge workspace well before the deadline to avoid
being locked out of submissions last minute.

Only the last version of your code before the submission deadline will be graded. It is highly
recommended that you update your code on edstem frequently and well before the submission
deadline. Last-minute "connection errors" are not a valid excuse.

In case you need an extension due to valid reasons, please fill up this form and we will follow up
with you. Ensure you have a valid reason and proper documentation with you before seeking an
extension. If you seek an extension beyond 10 days, contact STOP 1. See more here.

You might also like