Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can someone pretty please answer my computer science question :( i posted it twice but its the same question Lab6out implements a lottery game simulation
can someone pretty please answer my computer science question :( i posted it twice but its the same question
Lab6out implements a lottery game simulation that involves the following 40 images - found in lottery.zip: (Each image is 40x40) 40.bm Thc 40 images reprcscnt 40 lottcry balls uscd in crcating thc simulation. Onc class, namcd Lottery, and a driver function named main are needed for implementing this simulation. Your main function should perform the following steps 1. First, main should prompt the user for the number of lottery balls (.e., numbers) to play C:Windows system321cmd.exe How many lottery balls do you want to play: 6 minimum number of lottery balls is 3, while the maximum number of balls is 10. No data validation need be performed in main - data validation rules in the form of clipping the values will be implemented in the setter of the Lottery class 2. Next, main will use the following setter The setNoBalls to sct the number of lottery balls (i.c., numbers) that the uscr wants to play. (see Required Functions section below for detailed description). In this example, the number of balls (i.e., numbers) is equal to 6. Note: Perform the following steps in main is the user has entered a value at the above prompt that is not between 3 and 10 inclusivelv a. Check return valuc of setNoBalls - The return value will be false if its input paramcter is lcss than 3 or grcater than 10 inclusivcly. Display an informational message in main informing the user that he has entered an b. invalid value for the number of lottery numbers The setter - setNoBalls - will then automatically set the number of balls (i.e., numbers) to play based on the following rules c. If input 10 then no balls-10 In other words, the input parameter will be clipped to the min/max possible values 3. Next, main will prompt thc uscr for thc lottcry numbcrs. Thc number of prompts will bc cqual to the no balls entered in step 2. For this example the user will be prompted for 6 numbers. The first of these prompts are show below: C:Windowslsystem321cmd.exe How many lottery balls do you want to play: 6 Enter lottery # 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started