Prompt the user to enter the amount of tickets

Assignment Help Basic Computer Science
Reference no: EM131205459

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.

Reference no: EM131205459

Questions Cloud

What police and community relations era : The methods for delivering police services, such as team policing, neighborhood watch, police explorer programs, and the "ride-along" programs are indicative of what police and community relations era?
Describe the demand for labor in the corporate sector : Taxes affect not only primary markets but also related markets. If the corporate income tax is a tax on capital in the corporate sector
Litigating divorce and insurance fraud cases : Should congress enact laws requiring ISP's to formally track their customers' activities in an attempt to aid police investigating crimes, attorneys litigating divorce and insurance fraud cases, and the entertainment industry in locating illegally..
What are the frequencies of the various genotypes : What are the frequencies of the various genotypes and various phenotypes in this population? Assume Hardy-Weinberg equilibrium
Prompt the user to enter the amount of tickets : The program must prompt the user to enter the amount of tickets he/she wants to purchase (must be between 1 and 5) A ticket will be made up of two sets of numbers - a group of 5 numbers and another group of 1 number.
Used for communication between stations : An underground coaxial cable is being used for communication between stations A and B. The stations are 10 km apart. The cable develops a short circuit somewhere between A and B. a. How can you determine the position of the short circuit? Write do..
Identify the level of data measurement : GA508 - Identify the level of data measurement for the variables: Size, Displacement, Cylinders, Drive, Fuel Type, City MPG and Hwy MPG. Give reasons for your answer and Calculate and comment on the 95% confidence interval for the population mean o..
Design of the logic circuit : Kyle, Patrick, Jorge and Steven are hungry college students. They want a quicker way to decide where to go for lunch, the Marshall Center or Juniper. The majority wins, except when Jorge and Steven both agree, then they win. Any other ties end wit..
Discuss the arguments made in the given article : Environmental Services Programs in Developed and Developing Countries. Discuss the arguments made in the article and evaluate their modeling techniques using the author's assumptions

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Various translation reside

1. Describe how one string value like "Hello" can be displayed in different languages. How is the string stored in the widget? Where does the various translation reside?

  Create an instance of the datagrid control on the form.

Create an Exit button for the solution. In the Click event handler for the button, display a message box to get confirmation from the user before exiting the solution.

  Write a mips program that will alter an array of 100 doubles

Write a MIPS program that will alter an array of 100 doubles. No input or output is required. We will assume somebody else did it. Your program modifies the elements in the array as described

  How to identify duties of the lab employees

Assume that you decide to set up a computer forensics laboratory. Submit a planning report for your lab with the following components.

  Difference between independent poisson variables

Beginning with Z(O)=O, show that the distribution of Z(t) is given by the difference between independent Poisson variables of means λt and µt.

  Characteristics of an object-oriented language

What are the primary characteristics of an object-oriented language? How does an object-oriented language differ from a third generation language or a fourth generation language?

  Describe the components of the ethernet frame in detail

Describe the components of the Ethernet frame in detail

  Second version of the program

Write a Java program (non-GUI preferred) that has a method named atomic().Demonstrate in the program how two threads can, sometimes, invoke atomic() concurrently. Create a second version of the program in which the two threads cannot invoke atomic..

  Who do the sites promoting these toolsclaim to support

Who do the sites promoting these toolsclaim to support?

  Find companies that specialize in computer forensics

What needs clarified? it's plainly stated use google to find 3 companies that specialize in computer forensics of those 3 companies write 2 or 3 paragraphs comparing what each company does.

  What is the effective throughput of this lan?

Consider a 20,000,000-character message to be transmitted between two stations that are 150 meters apart, using a 10BaseTX LAN with a transmission speed of 50 meters per microsecond

  Selecting a windows 7 edition

Selecting a Windows 7 Edition

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd