Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Lottery Ticket Program. You offer three types of Lottery Tickets: Pick5 (a player chooses 5 numbers between 1 20), 2By2 (a player chooses

Create a Lottery Ticket Program. You offer three types of Lottery Tickets: Pick5 (a player chooses 5 numbers between 1 20), 2By2 (a player chooses 2 numbers, each between 1 20 they can be the same number) and Powerball (a player chooses 5 numbers between 1 20, and one additional number between 1 20). You will ask the user for their first and last name, how many and what type of ticket they want (they may choose up to one of each), and the numbers they are guessing. After randomly generating the winning numbers, store them in a text file. You will then compare their numbers to the winning numbers to determine if they match. Display the results of the picks, matches, winners. 1. Create a Pick5Ticket class that includes an array to hold 5 number (1 20) 2. Create a 2by2Ticket class that includes an array to hold two numbers (1 20) and a second array to hold 2 numbers (1 20) 3. Create a PowerballTicket class that includes an array to hold 5 number (1 20) and an additional number (1 20) 4. Create a WinningTicket class that includes 2 arrays to hold 5 numbers each (1 20), 2 arrays to hold 2 numbers each (1 20), and a Powerball number (1 20). You should get these numbers through a random number generator. 5. Create a Player class that includes a first and last name. 6. Create a purchase class that includes an object of Player, and an Object of each of the three tickets a. This class should also include static data members for ticket cost ($1.00) and for the winning amounts (you decide how much the player can win) Your application must include the following: Constructors Delegate Arrays Abstract Class or Interface Exception Handling Static Data Members Overloaded Operator or overridden method MessageBox Inheritance Data Validation File Input/Output Value Added - something not listed above

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

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago

Question

=+j Enabling a productive global workforce.

Answered: 1 week ago

Question

=+ Are you interested in creating or

Answered: 1 week ago

Question

=+working on a micro-multinational?

Answered: 1 week ago