RECENT ASSIGNMENT

Tweet Share WhatsApp Share
GET ANSWERS / LIVE CHAT


Team leader name:
Team leader ID:
Member 2:
Member 3:
Member 4:
MITS4002
OBJECT-ORIENTED SOFTWARE DEVELOPMENT
Project (30%)
Tattslotto
Due date: Sunday Lesson 12 11:59 PM
Late penalty applies on late submission, 20% per day would be deducted
0 mark for duplicated Submission or Shared Work
You will be marked based on your submitted zipped file on Moodle. You are most welcome to check your file with your lab tutor before your submission. No excuse will be accepted due to file corruption, absence from lecture or lab classes where details of lab requirements may be given.
Please make sure that you attend Lecture EVERY WEEK as low attendance may result in academic penalty or failure of this unit.
MITS4002 Research Study

This assessment item relates to the unit learning outcomes as in the unit descriptors.
This checks your understanding about object-oriented software development.
This assessment covers the following LOs.
LO1 Demonstrate understanding of classes, constructors, objects, data types and instantiation; Convert data types using wrapper methods and objects.
LO2 Independently analyse customer requirements and design object-oriented programs using scope, inheritance, and other design techniques; Create classes and objects that access variables and modifier keywords. Develop methods using parameters and return values.
LO3 Demonstrate adaptability in building control and loop structures in an object-oriented environment; Demonstrate use of user defined data structures and array manipulation.
LO4 Create object hierarchies using additional utility methods, application programming interfaces (API) and interfaces, in conjunction with existing classes and objects.
LO5 Demonstrate usage of collection to access data structures effectively and compose fullfledged object-oriented applications.
LO6 Extend the on object-oriented concepts and design patterns introduced in lectures to carry out further research on a chosen object-oriented design pattern or emerging recent programming languages.
. Page 2
Problem Description
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
You are required to use arrays and inheritance to code versions of these games.
Note: GAMBLING can be a serious problem for some people. Your lecturer DOES NOT encourage you to gamble.
Summary of Some of the Lottery Games
(From the Help pages of the above web site)
Game Day Description
Tattslotto Saturday 45 balls numbered 1 to 45, from which 8 balls are randomly selected. The first 6 balls are the winning numbers and the last two balls drawn are the supplementary numbers.
Oz Lotto Tuesday 45 balls numbered 1 to 45, from which 9 balls are randomly selected. The first 7 balls are the winning numbers and the last two balls drawn are the supplementary numbers.
Powerball Thursday 35 balls numbered 1 to 35 from which 7 are randomly selected. An eighth ball, the Powerball, is then drawn from a separate machine containing 20 balls numbered 1 to 20.
You will notice from your research and examination of the table that all games have several things in common.
All games
• 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.
UML Diagram
Code for TestGames
// A class that tests the instances of each class of game
//*************************************************************
*******
class TestGames
{ public static void main ( String [ ] args )
{
final int NO_OF_GAMES = 7 ;
LuckyGame [ ] games = new LuckyGame [NO_OF_GAMES];
TattslottoGame myGame = new TattslottoGame
(-Tattslotto-, -Saturday-, 1 , 45 ) ;
TattslottoGame OzLotto = new TattslottoGame ( -OZ
Lotto-, -Tuesday-, 1, 45 ) ;
TattslottoGame WedsLotto = new TattslottoGame (
-Tattslotto-, -Wednesday-, 1, 40 ) ;
Tatts2Game tatts2 = new Tatts2Game (-Tatts2-,
-everyday-, 1 , 99 ) ;
PowerBallGame powerBall = new PowerBallGame
(-PowerBall-, -Thursday-, 1 , 45 ) ;
……………………………………………………………………………………..// Super 66 instance
……………………………………………………………………………..// Pools instance
games[0] = myGame ; games[1] = OzLotto ; games[2] = WedsLotto ; games[3] = tatts2 ; games[4] = powerBall ;
……………………………………………………………………………………..// Super 66 instance
……………………………………………………………………………..// Pools instance for (int i = 0 ; i NO_OF_GAMES ; i++)
{ System.out.print
(- ******************************************* - );
System.out.print (-Input your numbers for - + games[i].getDay( ) + - - + games[i].getName( ) + - :- - ) ;
String input = Keyboard.readString( ) ; games[i].collectUserInput( input );
System.out.println ( games[i] ) ;
}// end for
}//end main
Sample output
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.
*******************************************
Input your numbers for Saturday Tattslotto :- 1 2 3 3 4 78 1 5 6
Invalid input
Saturday Tattslotto numbers are:
31 29 1 6 10 41 supplementary numbers: 25 38
6 user picks between 1 and 45 are 1 2 3 4 5 6
No. of winners 2 + 0 supps match
******************************************* Input your numbers for Tuesday OZ Lotto :- 1 2 3 4 5 6 7 Tuesday OZ Lotto numbers are:
2 29 19 21 36 31 40 supplementary numbers: 5 35
7 user picks between 1 and 45 are 1 2 3 4 5 6 7
No. of winners 1 + 1 supps match
*******************************************
Input your numbers for Thursday PowerBall :- 1 2 2 3 4 5 5 Invalid input
The user chosen powerball is 5 Thursday PowerBall numbers are:
1 32 34 5 35 33 and the POWERBALL is:- 5
7 user picks between 1 and 35 are
1 2 3 4 5 6 7 and the user chosen POWERBALL is:- 5
No. of winners 2 and you have the POWERBALL etc…..
Submission Details
Submission deadline: As stated in cover page.
Attach the following page to the front of your submission and submit all materials to your lecturer.
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 via LMS
Rubrics for MITS4002 Major Assignment
(x marks/20 marks x 30 marks)
Designing and implemen
ting of classes applying
OOP
principles and constructs as per the specificati ons Excellent in applying the OOP
principles and constructs
.
(5 points) Good in applying the OOP
principles and constructs
.
(4 points) Average
in applying constructs and
missing few OOP principles. (3 points) Poor in applying constructs and missing major OOP principles. (2 points) Attempte d but barely meets the specificati on. (1 point) Irrelevant/No submission. (0 point)
Compone
nt hierarchy of the testGame
class testGame is well
developed
, and all the child classes are
implemen ted. (5 points) testGame
is
developed and the child classes are
implemen ted. (4 points) testGame
is partially
developed , and few child classes are
implemen ted. (3 points) LuckyGame
GUI is partially developed, and one child class is implemente
d.
(2 points) Attempte d but barely meets the specificati on. (1 point) Irrelevant/No submission. (0 point)
Code Executing and Error checking with required output Program executes without warnings and gives the required output. (5 points) Program executes with warnings and gives the required output. (4 points) Program executes with many warnings and gives partial output. (3 points) Program executes and gives the partial output. (2 points) Attempte d but barely meets the specificati on. (1 point) Irrelevant/No submission/Do esn’t execute.
(0 point)
Report includes evidence of trial
runs and output Report includes all the evidence with relevant screensho ts.
(5 points) Report includes the evidence with relevant screensho ts.
(4 points) Report includes the evidence but missing few screensho ts.
(3 points) Report includes the evidence but missing major screenshots. (2 points) Attempte d but barely meets the specificati on. (1 point) Irrelevant/No submission. (0 point)



GET ANSWERS / LIVE CHAT