2.5. Arcade (25%) You will also need to create a class to model an Arcade. This class should have fields for the arcade'
Posted: Fri May 20, 2022 6:23 pm
Additionally, ArcadeCorp has asked that you provide the following methods: • findRichestCustomer () which should search the customers that are registered at a specific arcade to return customer with the highest balance; 7 getMedianGamePrice () which will consider the price per game for all arcade games within this arcade and return the median (if there is an even number of games then this method should average the price of the two middle games); • countArcade Games () which should return an int[] of size 3, where the first element is the number of cabinet games in this arcade, the second is the number of active games in this arcade (not including virtual reality games), and the third is the number of virtual reality games in this arcade; • printCorporate Jargon() which should be a static method in the Arcade class that prints a message and does not return anything. It should simply print the corporate motto of "GreedyJayInc. and ArcadeCorp do not take responsibility for any accidents or fits of rage that occur on the premises". It is up to you to decide how you wish to store collections of products and customers. The simplest solution is to use arrays/ArrayList, but you can use any data structure that is im- plemented in Java (such as those that extend the Java Collection class or similar). A small number of additional marks will be awarded for using a more appropriate data structure than array-based collections, but only if the data structure used is indeed more appropriate and the choice of data structure is justified in the code with a short comment (i.e. why exactly is the data structure that you are using a better choice than an array ArrayList). To be clear though, using an ArrayList or array will still lead to a good mark if implemented correctly.