The program must prompt the user to enter the amount of


What this program code

Here are some requirements for the program: JAVA Programming

  1. The program must prompt the user to enter the amount of tickets he/she wants to purchase (must be between 1 and 5)
  2. A ticket will be made up of two sets of numbers - a group of 5 numbers and another group of 1 number.
  3. The numbers must be randomly generated from the range of 1 - 56 for Group 1 and 1 - 46 for Group 2.
  4. There must  be no repetition of numbers in the same group.
  5. However, if the user wants for example 2 tickets, then it is possible for these two tickets to differ by only 1 number (so repetition between tickets are allowed providing that the 2 tickets are not identical).
  6. You are to use vectors or arrays to store the lottery numbers.
  7. The program must also prompt the user asking him/her if he/she wants to buy more tickets. If answer is "yes" rerun the program. If "no" terminate the program.
  8. Sort the numbers in Group 1 in ascending order  for each ticket purchased.
  9. Then display all of the tickets purchased by the user on the screen in the order of Group 1 followed by the single number in Group 2.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: The program must prompt the user to enter the amount of
Reference No:- TGS01589202

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)