Question: in java You feel lucky today, and you decide to play the lottery. You walk into a gas station and decide to buy 4 tickets.

in java
in java You feel lucky today, and you decide to play the

You feel lucky today, and you decide to play the lottery. You walk into a gas station and decide to buy 4 tickets. Each ticket has 5 random numbers generated between 1 and 10 . Each ticket cannot include a repeating number. The code provided below returns 5 non-repeating random numbers between 1 and 10 (you need to import java.util.Random) Write a Java program that checks the 4 purchased tickets against the winning numbers. For that purpose, you need to do the following: 1. Create a method called "generateTicket" that includes the code provided ( 5 non-repeating random numbers) below and returns a single dimension array of type integer. 2. Create a single dimension array called "winningNumbers" for the winning numbers. 3. Create a two-dimensional array called "Tickets" to hold all 4 tickets' information. 4. Compare each ticket to the winning numbers and announce the winning as follows: a. \$100K if the ticket matches all 5 winning numbers. b. $20K if the ticket matches 4 winning numbers. c. $2K if the ticket matches 3 winning numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!