Skip to content

Powerball


layout: default title: Lottery: Powerball


Reuse your ping pong ball and hopper classes from the NBA Draft project to simulate a Powerball drawing.

Task 1

In the same project as your NBA Draft application, add a package for Powerball classes.

Task 2

Design classes for simulating a Powerball drawing. * Who owns and loads the hopper(s)? * Who draws the winners? * Who initiates the drawing and reports the results?

The results of the drawing - winning numbers plus powerball number - should be returned to the class that initiated the drawing so they can be published. That is, don't just print the balls as they're drawn.

Task 3

Implement and run a Powerball application. Ideally, no ball or hopper code should need to be changed.

  • Information on Powerball: https://en.wikipedia.org/wiki/Powerball
  • Video of a Powerball demo https://www.youtube.com/watch?v=Vc_PRhQpeJI

Up