creating a powerball

Write a program that simulates the Powerball lottery. Create a PowerBall class that contains: – A field for an int array of size 6. – A constructor that initializes this array with 6 random values (0-9). – A method called checkMatch that takes as an argument an int array and returns how many numbers match the class’s int array. To match, the same numbers must be in the same position. Write a main class which asks to user to enter 6 numbers as their lottery ticket and store it in an array. Then create a PowerBall object and give the user’s ticket to the checkMatch method. Then figure out the amount won based on the return value. The winnings are determined as follows: If 0 numbers match, no winnings If 1 number matches, win $4 If 2 numbers match, win $7 If 3 numbers match, win $100 If 4 numbers match, win $10,000 If 5 numbers match, win $1 Million If all 6 numbers match, win Grand Prize of $450 Million Output the user’s lottery ticket, the powerball numbers, how many matched, and the amount of money won. (JAVA PROGRAM HELP) Do you want your assignment written by the best essay experts? Then look no further. Our team of experienced writers are on standby to deliver to you a quality written paper as per your specified instructions. Order Now, and enjoy an amazing discount!!

Focus Essays has been there for more than 10 years to offer students like you academic writing services.

Get our experience by placing an order with us and use the discount code PAPER15 to get 15% discount on all orders.

We deliver URGENT ORDERS within 6 hours. Get a quotation from the calculator below.

TRY OUR SERVICES TODAY.

[order_calculator]