Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You are to write a program name mega Million.java. You can use vectors or arrays as your data structure. Here are some requirements for the program:

  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.Sort the numbers in Group 1 in ascending order  for each ticket purchased.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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91957442
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question hci theories please respond to the

Question: "HCI Theories" Please respond to the following: • Imagine you are the manager of a medium-sized IT department. While walking through the hall one day, you overhear a senior-level software developer telling a ne ...

Suppose that we need to send four packets a b c d from a

Suppose that we need to send four packets (A, B, C, D) from a sender to a receiver. Consider two cases. 1) packet B is lost. 2) acknowledgement for packet B is lost. When there is a packet loss, always assume that only t ...

Maureen has preferences for two goods to be consistent with

Maureen has preferences for two goods to be consistent with the utility function. The price of good 1 is $4 each, and the price of good 2 is $12 each. For what incomes will good 1 be normal?

Question cyber attacks on critical infrastructures-a risk

Question: Cyber Attacks On Critical Infrastructures-A Risk To The Nation There has been a great deal of research related to cyber attacks and vulnerabilities and critical infrastructure, but there is an incomplete unders ...

Question using the apple company identify all the social

Question: Using the Apple company, identify all the social media platforms it currently uses. List all the social media platforms. List five different KPI's you could use to measure the engagement on each platform. Expla ...

You own a specialty company self made company smc which

You own a specialty company; self made company (SMC) which sells hats and jackets. You obtained an object IDENTIFIER 5000 under enterprises node from IANA. You have two branch locations. Each has an inventory system that ...

Question david doe is a network administrator for the abc

Question: David Doe is a network administrator for the ABC Company. David is passed over for promotion three times. He is quite vocal in his dissatisfaction with this situation. In fact, he begins to express negative opi ...

Requirementsdesign and implement an application with a

Requirements Design and implement an application with a graphical user interface to manage a library of songs. A song is uniquely identified by name and artist (case insensitive). Your application should have a SINGLE WI ...

Question suppose a network with 109 hostnames not including

Question : Suppose a network with 10^9 hostnames (not including the names of the nameservers themselves) uses non-recursive DNS. Assume that there is a single root nameserver, multiple local nameservers, and M levels of ...

Question a small financial focused business is looking to

Question : A small, financial focused business is looking to organize and secure its network. It currently has a single public IP address from a local telecom. Construct an argument as to how you think a company should e ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As