Details of this Paper

Create a Java application to generate and display 5 sets of 6 random unique Lotto numbers between 1 and 50

Description

solution


Question

Create a Java application to generate and display 5 sets of 6 random unique Lotto numbers between 1 and 50. Display the numbers sorted in ascending order. Use an array to store the numbers.;Create a method with the following header;public static boolean isFound(int[] lotto, int number);The purpose of this method is to determine if the lotto array contains the number passed as an argument. The method will return true if the number is ***** in the array, otherwise it returns false. As random numbers are generated, call this method to make sure the number generated is not already in the array.;The output of the program should appear as follows;LOTTO Numbers for set 1 --> 4 7 15 29 44 50;LOTTO Numbers for set 2 --> 11 14 38 42 43 49;LOTTO Numbers for set 3 --> 4 6 7 21 35 49;LOTTO Numbers for set 4 --> 1 7 20 24 27 39;LOTTO Numbers for set 5 --> 14 25 33 48 49 5

 

Paper#64865 | Written in 18-Jul-2015

Price : $19
SiteLock