Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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.1975

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 Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions