CMP-4008Y Programming 1
Reassessment Coursework Assignment 2
Learning outcomes
The aim of this assignment is to facilitate the development of Java and object orientated pro- gramming skills by designing and implementing a program to simulate the operation of a fic- tional arcade company. In addition to using the fundamental concepts that were developed throughoutthefirstassignment(suchas classes, objects, instancevariablesandinstancemeth- ods), this assignment will also develop skills in UML class diagrams, file I/O, inheritance, ex-ceptions and basic enumerative types in Java. Further general learning outcomes include: de- scribing abstract systems using technical diagrams; following specifications when developing software; documenting code to enhance readability and reuse; increased experience of pro- gramming in Java; increased awareness of the importance of algorithm complexity; and using inheritance to model relationships between classes.
Specification
ArcadeCorp, a new division of GreedyEnterprises Inc. has approached you to create a prototype system for simulating the use of their newly proposed contactless arcades. Driven by changes in many industries due to the recent pandemic, ArcadeCorp wants to open a cashless arcade on a floating island in the middle of the UEA Broad (pending planning permission).
Your task is to model ArcadeCorp’s new system using an object orientated approach in the Java programming language. You will need to model key objects in the system by creating classes to represent objects such as cabinet games (e.g. pinball, joystick games, etc.), active games (e.g. pool, air hockey, etc.), virtual reality games (e.g. using VR headsets, full-body tracking suits, etc.), customers, and arcades, in addition to a number of other classes to support the functionality of the system. A full description of the required implementation is given in the Description section, but in summary, you will:
1. create a UML class diagram to give an overview of the system;
2. implement the required classes and functionality in Java using an object orientated ap- proach, including sufficient documentation and evidence of testing;
3. simulate the use of the system through loading and processing a number of provided text files
Figure 1: An artist’s impression of ArcadeCorp’s proposed floating arcade in the UEA Broad.
Overview
To create a system that models customer interactions and transactions for arcades you will firstly need to be able to store information about arcade games. This will start with an abstract base class that stores basic information about generic arcade games, such as an ID number for the game, the game’s name, and the basic price to play the game (in pence). Subsequently, you will need to specialise this class to represent cabinet games, active games and virtual reality games.
All customers in the system will have a unique customer ID, a name, a balance and an age. Functionality will also be required to both top-up and charge accounts when appropriate trans- actions are carried out. Anyone from the public can sign up for a standard customer account, but since ArcadeCorp will be operating on UEA campus, they have agreed to special treatment of both CMP staff members and any UEA student. As a thankyou for forcing their students to prototype this system, ArcadeCorp will give all CMP staff a flat 10% discount when using any arcade game. Students, regardless of school of study, will get a flat discount of 5% off all arcade games, but will also be able to have a negative balance of up to ε5, similar to an overdraft. Further, the arcade will operate peak andoff-peak hours where specific discounts are applica- ble for different types of game (off-peak discounts are applied BEFORE customer discounts and specific details of the individual off-peak discounts for different game types are given in the Description section).
Once arcade games and customers can be modelled, each arcade should maintain its own collection of games and and its own collection of customers. It will need functionality to pro- cess transactions when passed a customer ID and a game ID, charging a customer the correct amount to play a game if if the customer has asufficient balance (or rejecting the sale if they do not). An age limit may also apply for certain types of arcade game and this should be checked too. An arcade will also need to keep track of the total value of all sales (this is the most impor- tantthingtoGreedyEnterprisesInc., ofcourse)anditwillalsorequiresomespecialised methods that are of interest to corporate, such as reporting the median price of all games within an ar- cade.
Finally, this will all be tied together by populating an arcade with customers and games by reading in a number of text files that have been provided. You will also be given a list of trans- actions in another fileto simulate the use of an arcade.
Please note that you are expected to provide toString methods for all object classes, ap- propriate comments to aid someone reading your code, and evidence of testing in all classes (i.e. simple test harnesses in all of your non-abstract object classes).
(hint: please read the full assignment rather than diving in straight away - it will make your life a lot easier if you implement it in a logical order and plan ahead).
Description
1. UML Class Diagram (15%)
Your first task is to fully read this assignment specification and then create a UML class diagram for the proposed system. You should include all classes, and relationships between them, but you are not required to include accessor and mutator methods in this diagram, and you also should not include your main method class (Simulation). Marks will be awarded for the ac- curacy and correctness of your diagram, and presentation will also betaken into account (i.e. make sure that it is clear and easily readable, and make sure it follows conventionstaught on this module for UML class diagrams and not conventions taken from anywhere else).
I recommend that you use diagrams.net as s

最低0.47元/天 解锁文章
689

被折叠的 条评论
为什么被折叠?



