Lottery Application- Write a Lottery class that simulates a lottery. The class should use the Random class (from the Java API) to generate a random number in the range of 0 through 9 for each element in the array. The class should also have a method that accepts an array of 5 integers that represent a person's lottery picks. The method is to compare the corresponding elements in the two arrays and return the number of digits that match. For example, the following shows that lotteryNumbers array and the user's array with sample numbers stored in each. There are two matching digits (elements 2 and 4) lotteryNumbers array: (7, 4, 9, 1, 3) user's array: (4, 2, 9, 7, 3)
OS: Windows XP; Browser: IE
HiCustomer Thank you for asking your question on JustAnswer. 1. I think your post was truncated, could you kindly send the rest of the requirements ?2. What is you Java version ?3. Are you using an IDE such as NetBeans, Eclipse or JGrasp ?4. Do you need a GUI (window) or a console (text mode) program is ok ?5. When do you need this done by ?Thank you.
1. I think your post was truncated, could you kindly send the rest of the requirements ?
In addition, the class should have a method that returns a copy of the lotteryNumbers array. Demonstrate the class in a program that asks the user to enter five numbers. The program should display the number of digits that match the randomly generate lottery numbers. If all of the digits match, display a message proclaiming the user a grande prize winner.
2. What is you Java version ?
Java 6.0-Standard Edition3. Are you using an IDE such as NetBeans, Eclipse or JGrasp ?
-jGRASP version 1.8.6_12. 4. Do you need a GUI (window) or a console (text mode) program is ok ?
nope, no GUI's. I just have to run the program through JGRASP. 5. When do you need this done by ?
Whatever is convenient for you...I have two AP tests this week so I was planning on getting these in by Wed., but anytime this week would be great (the sooner the better). I have two more that I'm working on, but I gave up on this one for the moment.
That's great. Now I am able to start working on your assignment. I will send you the answer by tomorrow (05/05/2009).Thank you.
ok, sounds great. Thank You.
Hi,Here you go: LotteryApplication.javaLet me know if you need further assistance.If everything is ok, please do not forget to click in the Accept button and leave me a positive feedback.A bonus is also greatly appreciated.Next time you need my help, just start your question with TO RAFAEL MARTINS.Thank you.
Desktop, Mobile and Web Developer. 7+ years of experience. Creative solutions provider.