Array-based Application Programming

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

 General description: A tiny Lotto system allows up to 1000 people play “lotto”. This system provides some functions to facilitate lotto players to check their game status and get more information of lotto playing statistics. To simplify the system, we generate random data to mimics the lotto drawing, and we also use random data instead of real game data taken from lotto players. The lotto drawing is a process when the system randomly generates winning numbers, which is a list of 8 distinct integers from a barrel of 30 integer numbers (i.e., all numbers are between 1 and 30, inclusive). These 8 winning numbers are divided into two parts: the first part consists of the first 6 winning numbers in sequence, called Primary Winning Numbers (PWNs), and the second part consists of the last two winning numbers, called Supplementary Winning Numbers (SWNs). One example of the lotto drawing result may look like (see Figure 1): PWNs SWNs 14, 18, 22, 9, 29, 6 17, 30 Figure 1. Format of PWNs & SWNs For simplicity, we assume that each player is assigned an ID number, k (1 k 1000). We sometimes use the ID number to identify a player (e.g., player i, k, etc.). We also restrict that one player can only play one set of game numbers. That is, each player can choose one set of 6 distinct integer numbers as his/her game-numbers, each of which is also from a barrel of 30 numbers (i.e., all game numbers are integers between 1 and 30, inclusive). All players’ game-numbers are stored in a tiny “database” which, in this case, is implemented/replaced by a two-dimensional array (or list), lotto[0…999][0…5]. More specifically, for each player i, his/her game-numbers are stored in the array of lotto[i-1][0…5. The array lotto[0…999][0…5] can be represented, indicatively, as below (see Figure 1, note that the data inside the array is illustrative only): Player’s ID, i Player i’s game numbers 0 12 5 27 10 11 3 1 6 3 22 19 25 30 … 999 12 15 8 15 8 28  Figure 2. Format of game data in the array of lott[ ][ ] There is a total of 4 classes/levels of lotto winners. To be a winner, a player’s game-numbers must meet the winning conditions/criteria, which are described as: • A 1st class winner is one whose game-numbers match/contain all 6 PWNs; • A 2nd class winner is one whose game-numbers contain any 5 PWNs; • A 3rd class winner is one whose game-numbers contain any 4 PWNs; • A 4th class winner is one whose game-numbers contain any 3 PWNs, or contain the two SWNs. Note: As a general rule, if a player is a winner, he/she is considered as a winner of his/her highest class only, not a winner of any lower classes (e.g., if p is 1st class winner, p will not be considered as a 2 nd, or 3rd, or 4th class winner, although his/her game-numbers may still meet the winning conditions of lower classes) 

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our Guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Online Class Help Services Available from $100 to $150 Weekly We Handle Everything