Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for a C# program. I would greatly appreciate any help! Thank you:) For this assignment you're going to create a console application called

This is for a C# program. I would greatly appreciate any help! Thank you:)

image text in transcribed

For this assignment you're going to create a console application called A02PBallGenerator. This app is going to mimic a quick pick program in a lotto terminal. When the user runs your app you're going to select the numbers for them. Then you'll ask them if they'd like another set of numbers. Y for yes and N for No Use a do while loop so that if they type a lowercase or uppercase y then you will give them a new set of numbers replacing the original ones. If they type anything else then exit the program. In each game, players select five numbers from a set of 69 white balls and one number from 26 red Powerballs; the red ball number can be the same as one of the white balls. Your app is going to randomly choose five numbers from the white ball pool (1-69) and one from the red ball pool (1-26). Here's the catch, you can't repeat any of the white numbers. So if you find a duplicate then you have to keep choosing until you have a unique value. When you have your five unique values then I'd like you to sort those values in ascending order. In other words, if your app chose 65, 2, 33, 14, 64 then you'll sort those so they show as 2, 14, 33, 64, 65. For the red ball you just randomly choose from 1-26 Here is a function that will return a number between (and including) the min and the max. So if you pass in 1 and 69 as arguments then you'll get a number between (and including) 1 and 69 and you'll get 1 to 26 (inclusive) if you pass in 1 and 26 for min and max. Leave the random Number declaration outside of the method. public static Random random Number = new Random ();//Global, outside of any methods. static int getRandomIntInclusive (int min, int max) return (randomNumber .Next (min max +1))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions