Answered step by step
Verified Expert Solution
Question
1 Approved Answer
FOP GenerateRandomWinner i. Method that takes a Random class object reference as a parameter. ii. This method generates a random digits for the tiCkEt and
FOP GenerateRandomWinner i. Method that takes a Random class object reference as a parameter. ii. This method generates a random digits for the tiCkEt and returns it. ThE type is String. GenerateSelectWinner i. Method that takes a Random class object reference as a parameter and the max possible index of the array in a given scenario. ii. Method retnms an index of the array of a winning ticket. (this is to test your two algorithms to see if it actually works by guaranteeing a winning ticket is found). Solutionl i. One of the solutions that finds the winning t i oket, ii. This method should run 0(n). iii. Returns a Boolean if found or not. Soluton2 i. One of the solutions that finds the winning ticket. ii. This method should run 0(lgn). iii. Returns a Boolean if found or not. You will need to create an accessor method to retrieve the ticket attribute. You will need to create a sort method to sort the tickets. You may create any additional methods that will assist in this programming assignment
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started