Coding Assignment #2 Create a Lottery Appl we will have these Tasks: 1) interact w/ the User and ask the User questions 2) hold the Lottery data (fields) and Business rules 3) generate a Lottery Ticket for the User based on thier choices ---------------------------------------------------- step 1) thinking about the problem the User need to select: 1) are they using auto-pick where the appl will generate a random set of Lottery picks? if they say no to auto-pick we need to ask the User for thier Lottery numbers 2) do they what "Double Down" where the cost goes up, and payout doubles? 3) which date are they buying the ticket for? Saturday or Wednesday pick Business Rules: the Lottery is 6 numbers out of 54 the User can pick any numbers but they cannot be duplicate the User cannot pick a number greater than 54 the auto-pick will result in 6 unique numbers between 1 and 54 step 2) How many classes do I need? 1) an Appl (main) to talk to the User 2) an Entity to hold the Lottery Ticket 3) an Action to generate the Lottery Ticket ???? step 3) Start coding name the Project: Lottery name the packages and classes design the program flow ------------------------------------------------------- program flow ask the user is they want auto-pick if yes call the Lottery generator to auto-pick a Lottery Ticket else loop 6 times and ask for a number pass the array of numbers to the Lottery generator and get back a Lottery Ticket display the Ticket details to the User ================================================== my Entity class hold the data fields for the Lottery Ticket and hosts the business rules for these fields fields/rules an array of 6 integers -> numbers the Lottery date -> String Saturday/Wednesday boolean doubleDown -> defaults to false add a new field to the LotteryTicket int powerBall <- this is an integer between 1 and 26 your assignment for this afternoon is: 1) create a test for LotteryTicket right click the project and select new -> source folder and name it test 2) create LotteryTicketTest.java right click the test folder and select new -> JUnit Test Case and enter the package (use the same package as the Entity class) and name LotteryTicketTest (select JUnit 4 Test, and add to project) 3) to the test class add: a test for the wrong date (try Sunday) a test for a valid date 4) to the Entity class add the private field to hold the powerBall add the get/set methods in the constuctor initialize the powerBall to 1 in the set method add the business rules int powerBall <- this is an integer between 1 and 26 5) in the test add tests for a powerBall less than 1 a powerBall greater then 26 a valid powerBall value