Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
UTS CRICOS PROVIDER CODE 00099F
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
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:
UTS CRICOS PROVIDER CODE 00099F
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
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
toString() – several of the classes will have a toString() function, with the following formatting:
1. Customer.toString() will produce a string of the form: