Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Lottery Application using Collections. (Marks 20) Create three classes one as Customer class, second as Lottery class and third as Test class with

Create a Lottery Application using Collections. (Marks 20) Create three classes one as Customer class, second as Lottery class and third as Test class with main method in it. 1) Customer : customer_id, name, age,num1,num2,num3,num4,num5,num6 ( these 6 numbers can have values between 1-9 numbers not unique) 2) Lottery : has Customer array

a) method1 : buyTickets( customer_id, name, age, num1,num2,num3,num4,num5,num6) create customer object and add to customer array

b) pickLottery() - i) choose random number between 1-9 , 6 times ii) compare the numbers from customer array. iii) announce 10000 price for user name if 4 number matches iv) announce 1000000 price for user name if 5 number matches v) announce 100000000 price for user name if 6 number matches. O/P :

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

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions