posted by .

Problem 6.9
Lottery Number Generator
A lottery commission offers four different lottery games to play: Three-number, Four-number, Five-number and Five-number + 1 lotteries. Each game has independent numbers. Develop an application that randomly picks numbers for all four games and displays the generated numbers in a GUI. Declare a method that generates a random number based on a range given, and returns the random number as a String. The games are played as follows:
a) Three-number lotteries require players to choose three numbers in the range 0-9
b) Four-number lotteries require players to choose four numbers in the range 0-9
c) Five-number lotteries require players to choose five number in the range 1-39.
d) Five-number + 1 lotteries require players to choose five numbers in the range 1-49 and an additional number in the range 1-42.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computers(Java Programming)

    Service Class: Lottery Write a Lottery class that simulates a lottery. The class should define an array of five integers named lotteryNumbers. The constructor should use the Random class (see the Java API) to generate a random number …
  2. Math-Answer included

    Five numbers are to be picked, without repetition, from 44 numbers to determine the winner of the Fortune Five game in the state lottery. If the order of the numbers is insignificant, how many different ways can a winning quintuple …
  3. Statistics and Probability

    The Tri-State Pick 3 lottery game offers a choice of several bets. You choosea three-digit number. The lottery commision announces the winning three-digit number, chosen at random, at the end of each day. The "box" pays $83.33 if the …
  4. math help!

    A lottery game asks you to pick 5 numbers from the set 1, 2, 3, ... , 29, 30. How many ways are there to play this lottery game?
  5. java programming

    Create a program that will generate lottery numbers for the user. There are two types of numbers in the lottery, the standard numbers 1-43 and the power ball number 1-60.There are three different lottery games, a three number game, …
  6. Math

    In the town of Niceville, a local lottery is held once a year for the residents. Lottery tickets cost 50 cents apiece. Each lottery ticket contains four numbers, from 1 to 20. The lottery machine will select six numbers from 1 to 20. …
  7. Math

    PLEASE HELP I DON'T KNOW WHAT TO DO D': I don't understand what to do or how to even start.... In the town of Niceville, a local lottery is held once a year for the residents. Lottery tickets cost 50 cents apiece. Each lottery ticket …
  8. Static

    The country of Statland runs a national lottery for its people. In this lottery, an urn contains 42 balls that are individually numbered 1, 2, ..., 42. Each week, 5 balls are drawn from the urn without replacement. Gamblers pay a small …
  9. probability

    The state of Ohio has several statewide lottery options. One is the Pick 3 game in which you pick one of the 1000 three-digit numbers between 000 and 999. The lottery selects a three-digit number at random. With a bet of $1, you win …
  10. stats

    In a straight 3 lottery you choose a 3 digit number. A 3 digit number is chosen at random, If your number mataches you win $250. 1. How many diifrent three digit numbers are there?

More Similar Questions