Question: I need help with below Java Programs Createthree classes one asC ustome r class, second as Lottery class and third as Test class with main

I need help with below Java Programs

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

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

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 :

Sort the customers who have matched numbers, according to AgeOr Name; (5 Marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!