Write a class called PowerBall that simulates the Power Ball lottery game.

Completado Publicado Jan 19, 2014 Pagado a la entrega
Completado Pagado a la entrega

Write a class called PowerBall that simulates the Power Ball lottery game. The class should have an array of integers representing the 5 winning picks for the white balls numbered 1 to 59 (no duplicates), an integer representing the winning power ball number numbered 1 to 35, and an integer that specifies the jackpot for the game. Your PowerBall class should have the following constructor / methods:

public PowerBall(int jackpot) {}

public int getWinningPowerBall() {…}

public int [] getWinningNumbers() {…}

public int getPayout(int[] picks, int pb) {…}

public String toString() {…}

Create a program called PowerBallConsole that includes a main method to test your PowerBall implementation. Your PowerBallConsole class should create a new PowerBall instance and ask the user to enter their 5 picks plus a power ball number. The console should display the winning numbers, the power ball, and the player’s cash payout. Use the following table to determine the payout:

Powerball match only $4

1 number plus PB match $4

2 numbers plus PB match $7

3 numbers; no PB match $7

3 numbers plus PB match $100

4 numbers; no PB match $100

4 numbers plus PB match $10,000

5 numbers; no PB match $1,000,000

5 numbers plus PB match Jackpot

Java JavaScript

Nº del proyecto: #5338249

Sobre el proyecto

2 propuestas Proyecto remoto Activo Jan 19, 2014

Adjudicado a:

tapsitiwari

Hi, I can implement the class easily for you. Please message me so that we can finalize & I can start with the implementation. regards Tapsi

$30 USD en 1 día
(6 comentarios)
2.9

2 freelancers están ofertando un promedio de $30 por este trabajo

XFastSolution

Dear sir, With expertise in Java and familiar to PowerBall, I would be a good fit. I can put my best effort to complete it today. Kind regards, LY

$30 USD en 1 día
(5 comentarios)
2.7