Question
In C#, design and implement a program that simulates a lottery. The user should be asked to enter 5 integers between 1 and 69 and
In C#, design and implement a program that simulates a lottery. The user should be asked to enter 5 integers between 1 and 69 and an additional integer between 1 and 26. The computer will generate random numbers, 5 between 1 and 69 and 1 between 1 and 26, for the winning lottery ticket. The program should display the winning lottery ticket as well as the user's results. The image below gives the possible prizes.
Using TryParse for input validation, include these methods in the solution:
GetWinningTicket()
GetTicket()
GetInt()
DisplayTicket()
CountMatches()
HasNumber()
GetTicketValue()
DisplayResults()
MATCH PRIZE 5 OF 5 + POWER BALL JACKPOT 2016.02.0 5 OF 5 $1,000,000 Eco L3.20 4 OF 5 + POWER BALL $50,000 LEONE SIN 4 OF 5 $100 CEOL 1 30F5 + POWER BALL $100 3 OF 5 $7 TEOSTUSTE 2 OF 5 + POWER BALL $7 10F5 + POWER BALL $4 OF 5 + POWER BALL $4 EOS 11.1975 MATCH PRIZE 5 OF 5 + POWER BALL JACKPOT 2016.02.0 5 OF 5 $1,000,000 Eco L3.20 4 OF 5 + POWER BALL $50,000 LEONE SIN 4 OF 5 $100 CEOL 1 30F5 + POWER BALL $100 3 OF 5 $7 TEOSTUSTE 2 OF 5 + POWER BALL $7 10F5 + POWER BALL $4 OF 5 + POWER BALL $4 EOS 11.1975Step 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