Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

.Make Lottery Application using Collections. Createthree classes one as C ustome r class, second as Lottery class and third as Test class with main method

.Make Lottery Application using Collections.

Createthree classes one as Customer class, second as Lottery class and third as Test class with main method in it.

1) Customer : id, num1,num2,num3,num4,num5,num6 ( 1-9 numbers each number)

2) Lottery : has customer array

a) method1 : buyTickets( customer id, 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.

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

Which of the following connects the south america to north america?

Answered: 1 week ago

Question

Which of the following is the highest peak of South America?

Answered: 1 week ago

Question

Highest active volcano of the south america ?

Answered: 1 week ago

Question

Where would you see the nodes of ranvier ?

Answered: 1 week ago

Question

Damage to the hippocampus is the most likely to impair ?

Answered: 1 week ago