This project is based on the design, and implementation in Java, of the seven different Lottery games being Saturday Tattslotto, Oz Lotto and Powerball. Details of these games can be found at http://www.thelott.com
In Part 1 of the project, you are asked to use arrays and inheritance to code versions of these games and inPart 2 to create an appropriate GUI that writes to a report file.
You will notice from your research and examination of the table that all games have several things in common.
• have a name,
• run on a day of the week
• have a set of randomly generated numbers.
Also, each of the randomly generated numbers have a minimum and maximum possible value, for example: For Powerball, the minimum value is 1 and the maximum value is 35.
An abstract class, LuckyGame can be used to represent the generic concept of a game of chance. A suitable partial design is shown in the following UML diagram. In the UML diagram:
• The LuckyGame class represents the generic concept of a game of chance and therefore is to be declared as an abstract class. It contains two abstract methods
setNumberOfRandoms( ) and collectUserInput (String input). The LuckyGame class also contains an array of String which is used to record the randomly generated numbers used by each object of LuckyGame type.
• The class TattslottoGame is a LuckyGame and it thus should implement code for LuckyGame’s two abstract methods as well as its own constructor and any other methods.
• The games SaturdayTattslotto and Oz Lotto are all instances of the class TattslottoGame.
• You can implement the remaining class games in any manner you believe appropriate. For example, class PowerBallGame can be implemented using either using
o Option 1: the class PowerBallGame is a LuckyGame and thus should implement code for LuckyGame’s two abstract methods as well its own constructor and other methods.
o Option 2: the class PowerBallGame is a TattslottoGame and thus should implement code for its own constructor and other methods.
• You have been provided with some code for the class TestGames, which is a text-based application used to create instances of games and test all of their respective behaviours.
• To collect user input for all games, a class UserInput is needed. It should collect user input and deal with any problems in the input, such as repeat numbers or numbers outside the possible range of values.
An example of some output from a run of TestGames. NOTE: ALL OUTPUTS ARE ONLY SUGGESTIONS and should be used as a guide to your implementations.
In Part 1 of the project, you are asked to use arrays and inheritance to code versions of 7 Lottery games. In Part 2, using swing classes wherever possible, you need to create an applet for players. The applet should allow a player to choose and run a game of their choice and find out the results of their game. Each time a game is played, the applet writes information about the game to a file called report.txt. This information would be similar to that shown as sample output for Part 1.
If there are any problems creating this file, then the applet reports the problem to the user.
NOTE: It is not expected that you should need to rewrite any of the classes from Part 1 of the Project. Rather you will create instances of the relevant classes when you need them for Part 2. The application for this project should create at least one new class LuckyGameApplet, however a good design should divide the computational workload and create/use classes where needed. You may even decide to use Threads and create animation!
The design of the applet’s appearance is totally up to you; the more colourful and well organized, the better (use layout managers). Choose components that reduce user error, e.g., use check boxes or radio buttons when asking the user to choose the game they wish to play.
As the designer, the functionality of the applet is also up to you, as long as the basic problem description is covered. Feel free to add any extra features that you feel are useful. For instance, you may want to add a quick pick selection for the player, or continually add data to the file over a number of games, run statistics of the games played, etc., etc.
It is necessary to draw a component hierarchy for your final Applet design.
What You Have to Submit
Each student submits
1. A document detailing the design of your solution in as much detail. It should include an updated UML diagram of the inheritance hierarchy as well as the component hierarchy for the applet’s appearance
2. The code for each class in your design. Each class listing should be fully documented commencing with a heading that includes your name, student number, date written, and lecturer’s name, along with a brief description of the class. At the start of each method, there should be a comment clearly describing what the method does.
3. A readme.doc file with information on how to run your program. Include any extra information about your design and program that you wish the marker to know.
4. A word document with evidence of trial runs of your program, i.e. screen printouts of the results where you have tested all the features of your code.
5. Put 1, 2 ,3 and 4 together in one zipped folder. Submit this zipped folder to Moodle
Programs are graded on a 100 marks scale. The marks will be assigned as follows:
• 60 marks- Program meets specification and is OOP in design. Extra functionality is encouraged and rewarded in these marks.
• 5 marks – Inheritance hierarchy
• 5 marks – Component hierarchy of the LuckyGameApplet class
• 20 marks – Evidence of error checking in code, trial runs and screen outputs.
• 10 marks - Overall presentation of work and quality of solution.
SOFTWARE DEVELOPMENT ASSIGNMENT, Operating Systems Assignment Help, Python Assignment Help, Database Assignment Help, Computer Networks Assignment Help, IT Assignment Help, Data Analytics Assignment Help, Java Assignment Help
Holding a PhD degree in Finance, Dr. John Adams is experienced in assisting students who are in dire need...
55 - Completed Orders
Canada, Toronto I have acquired my degree from Campion College at the University of Regina Occuption/Desi...
52 - Completed Orders
Even since I was a student in Italy I had a passion for languages, in fact I love teaching Italian, and I...
102 - Completed Orders
To work with an organization where I can optimally utilize my knowledge and skills for meeting challenges...
109 - Completed Orders
JOB OBJECTIVE Seeking entry level assignments in Marketing & Business Development with an organization...
202 - Completed Orders
Current work profile Project manager- The Researchers Hub (2nd Jan 2016 to presently working) Researc...
20 - Completed Orders
Sales Assistant, Mito Marina Assigned to the Stationery dept – assisted in merchandising, stock taking...
100 - Completed Orders