25.03.2021
48024
Applications Programming Assignment 1
Topics:
OO Design, Standard Patterns, Lists
Learning Outcomes:
This assessment task addresses the following subject learning objectives (SLOs): 1, 2 and 3
Due date:
11:59PM Friday 16 April
Weight:
35%
Individual Work
All work is individual. You may discuss ideas, approaches and problems, but you should write every line of code yourself except for code copied from the lecture notes, lecture code or lab code. You MUST NOT let another student see your solution code, and you MUST NOT look at another student’s solution code. More information about Academic Misconduct can be found at:
http://www.gsu.uts.edu.au/rules/student/section-16.html
UTS CRICOS PROVIDER CODE 00099F
25.03.2021
Specification
The Board Game Renting System (or Game Kiosk) will consist of two main components, an administrative component, and a game catalogue.
The administrative section will allow, through text-based menus, the addition and removal of customers, the addition and removal of games in the catalogue, the display of customer records, the display of a customer’s 3 favorite games and the top-up of customer accounts.
The catalogue will store a list of all the games in the kiosk, a list of the genres of those games, and a list of the available games. The catalogue will also allow display of the games in a number of ways, including by availability, genre and year. Finally, the catalogue will also handle the renting and return of games.
Each customer record will include the customer’s name, their chosen ID number, their current balance, which games they are currently renting and their full renting history.
Each game record will include the game’s title, its genre, its price and the year in which it was made.
An aside
While reading the first part of the specification, you will notice there is a lot going on.
How many functions did you identify?
How many classes did you identify?
What are the fields in each class?
How many goals did you identify?
How many patterns did you think of that might be applicable?
This assignment will be challenging, and you will probably want to manage your time well.
How long do you think it will take you to code the functions?
How long do you think it will take you to code each goal?
A good rule of thumb is to think of an estimate, and then multiply that number by 3 or 4!
To manage your time well, you may need to figure out which parts of the assignment you can start early.
Which parts can you start now?
Which parts can you start in week 6?
If you complete parts in the same week that you learn the topics (while they are fresh in your mind), they will take less time to complete.
UTS CRICOS PROVIDER CODE 00099F
25.03.2021
Requirements
Your design will consist of exactly the following classes with the listed fields, declared as indicated. You may not add or remove classes or fields; however, you may add constructors, functions and procedures to complete your design (in fact, you will have to!). You should pay careful attention to the tests on ED, as these will help guide you with some (but not all) of these methods.
To help visualize the design, a partial class diagram has been provided
Classes – your design will consist of these 6 classes:
1. Kiosk
2. Catalogue
3. Customer
4. Game
5. Genre
6. In (this is just the class you’ve been using throughout the labs to facilitate simpler I/O)
Fields – All the fields have been clarified in each class and they should not be modified. The fields also have some additional requirements and structures:
Lists all have the abstract type of List<>, but must be instantiated with a concrete type that implements the List<> behavior (you will see two of these in week 6, you can choose either – you may also want to think about why you might do things this way).
Constructors – the constructors of the class have the following requirements:
1. All constructors initialize the fields of their class.
2. The Kiosk constructor takes no parameters.
3. The Catalogue constructor takes a single parameter, the Kiosk which it belongs to.
4. The Customer constructor takes three parameters, the ID, name, (initial) balance, corresponding to the three fields identically named.
5. The Game constructor takes four parameters, corresponding to the title, year, genre and price, with the same types as the respective fields.
6. The Genre constructor takes a single parameter, the name of the genre.
UTS CRICOS PROVIDER CODE 00099F
25.03.2021
toString() – several of the classes will have a toString() function, with the following formatting: 1. Customer.toString() will produce a string of the form:
e.g.
50 Angela HUO $ 15
Note: \t is the escape code for the tab character. 2. Game.toString() will produce a string of the form:
2021 UTS Monopoly Dice Rolling $ 4 3. Genre.toString() will produce a string of the form:
e.g.
Role Playing
The main method of the program will be in the Kiosk class.
Top-Ups: The Kiosk should also implement a top-up system. A customer should be able to top up their account by simply providing their ID and the top-up amount. When renting a game, the price of the chosen game will be deducted from the customer’s account decreasing their balance. If the customer does not have sufficient funds, they will not be able to rent any games.
Test Cases
For testing purposes, please make sure that you have a data list of games and customers in the constructors as follows:
Title
Year
Genre
Price
Robinson Crusoe
2012
Action Queue
3
Talisman
2007
Role Playing
4
Three Kingdoms Redux
2014
Hand Management
3
Dungeons & Dragons
2010
Modular Board
4
Elder Sign
2011
Modular Board
3
ID
Name
Balance
101
Jaime
10
102
Luke
10
103
William
1
UTS CRICOS PROVIDER CODE 00099F
25.03.2021
Advanced Requirements
To achieve a mark of >84, you must implement a favorite reporting function (or set of functions). This corresponds to an item in the main menu. Choosing this option should prompt the user for a valid customer ID, and then display the user’s 3 most rented games, in order of highest renting frequency to lowest. For two games share the same frequency, the earlier rented one rank higher. If the user has only rented less than three games, it will show those games alone. A sample partial I/O trace follows, red text is used to indicate user input:
Welcome to the Game Kiosk! Please make a selection from the menu: 1. Explore the catalogue.
2. View your customer record.
3. Show you favourite games.
4. Top up account. 5. Enter Admin Mode. X. Exit the system. Enter a choice: 3
Enter a customer ID: 101
Angela’s favourite games are:
2012 Robinson Crusoe Action Queue $3 2010 Dungeons & Dragons Modular Board $4 2011 Elder Sign Modular Board $3
Expected Workload
The time to do the assignment to a credit/distinction level has been estimated at 25 hours for a student of average ability who has completed all the tutorial and lab exercises.
Online Support
The Assignment 1 channel has been set up on ED discussion board so that students can ask questions, and other students can reply. The teaching staff will only post a reply only if the student response was wrong, or in the case of correcting a mistake in the assignment specification.
You must not post or share Java code to the discussion board. The board is there to help you, not to provide the solution. Posting your code is academic misconduct and will reported. Each time this rule is violated, the code will be removed and replaced with a comment of the form: “Strike 1: Posting code”. After 3 strikes, you will be muted from the discussion board for the whole semester.
A dynamic FAQs (Frequently Asked Questions) has been pinned as the megathread in the channel and their answers will be posted on ED alongside the question. If you have a question, check the FAQ (megathread) first, it may already be answered there. You should read the FAQ (megathread) at least once before you hand in your solution, but to be safe check it every couple of days. Anything posted on the FAQ (megathread) is considered to be part of the assignment specification. The FAQ will be frozen (no new entries) two days before the due date; no questions will be answered after it is frozen.
If anything about the specification is unclear or inconsistent, check the FAQ (megathread) first, then contact the subject coordinator who will try to make it clearer by replying to you directly and posting the common questions and answers to the FAQ. This is similar to working on the job, where you ask your client if you are unsure what has to be done, but then you write all the code to do the task. Email huan.huo@uts.edu.au to ask for any clarifications or corrections to the assignment.
UTS CRICOS PROVIDER CODE 00099F
25.03.2021
Marking Scheme
The marks for the assignment are divided into the following functionality components (note that individual tests may test several functionality components, and a functionality component may be tested by several tests):
Functionality Component Mark Allocation
Main Menu 4
Catalogue Menu 4
Admin Menu 4
Add Customer 9
Add Game 9
Remove Customer 5
Remove Game 6
Show Games 6
Show Games by Category 8
Rent 4
Return 4
Bad Input 3
Customer Record 8
Favorites 16
Account Top-up 10
This adds to a mark out of 100, at makes up 35% of your final assessment mark.
UTS CRICOS PROVIDER CODE 00099F
25.03.2021
ED Marking
Your solution is marked for correctness by comparing the output of your system to the output of the benchmark system in ED. You can submit a solution to ED many times by press “MARK”; I urge you to do this, so you receive credit for your work. Any code hasn’t been “MARK” by ED won’t be credited.
ED will test the features of your program in a certain order, but it cannot test the more advanced goals until the basic goals are working. To receive marks, you must pass ED’s test cases in the order in which ED tests them.
Your code is marked by software, so you can get a good mark by fooling or spoofing the software. If you spoof a task worth N marks, you receive a penalty of 2*N marks.
Submission and Return
Your provisional mark and feedback is generated immediately each time you submit to ED. However, it takes time for the analysis of spoofing, plagiarism, collusion and general cheating, which will start two weeks following the due date. If you are suspected of Academic Misconduct, I will forward your case to the Misconduct Committee and will notify you by manual feedback in ED.
There is no scheduled late submission period. An extension of up to 3 days may be given by the subject coordinator before the due date; you have to supply documentary evidence of your claim. An extension CANNOT be given after the due date or exceed 3 days. You may also apply for special consideration for reasons including unexpected health, family or work problems. More information about how to apply for special consideration can be found at: http://www.sau.uts.edu.au/assessment/consideration.html.
UTS CRICOS PROVIDER CODE 00099F