Question: LottoGame.java has methods: a)Hashet generateNums: return 5 random number between 1 and 50, single digits should be printed with 0 before like this 02 and
LottoGame.java has methods: a)Hashet generateNums: return 5 random number between 1 and 50, single digits should be printed with 0 before like this 02 and no digit should be appearing more than once. b)int winnerVerify : take user guess and return how many nums are same, shouldnt be affected with order c)double moneyWon - returns amount user won of numbers he guessed (0-3 no win, 4- 2, 5-10) d)boolean verifyGuess(hashset Guess ) - returns false if less then 5 guesses made and if number guessed is out of given range. If single digit is guessed, it should add 0 before it. e) Main method - create winning set and get user to guess 5 winning numbers between 1-50 and store them as Hashset. use verifyGuess to check if they valjd, and if they not ask user to guess again. If the guess is valid, show winnings. PART 2 in LottoTest.java write unit test for each method(3 tests at method involved). After writing a test, it should fail and be commited to repository. In game.java implement method so it will pass unit test,when its succeded , commit to repository
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
