To Projects
IT 238 -- Project 3
Lotto Simulator
- Relevent Example: Dice Example
- In a Lotto game, the total number of balls is n and the number of balls drawn
without replacement is k. Before the balls are drawn, you choose k numbers from
1 to n, sorted in order from smallest to largest. When the balls are drawn,
if they match the numbers that you picked, you win.
- The payoff depends on the number of winners and elapsed time since there
was at least one winner.
- Your job is to design a user interface that displays the lotto balls that
are drawn when drawing up to balls from 5 total of 30 balls.
- Use 5 image elements to display the ball images from this zipfile:
lottoballs.zip
- Use a button to perform the drawing.
- Use a Lotto class object in the script lotto-class.js to
simulate drawing the balls.
- In addition to displaying the Lotto ball images, also display an additional image on your page.
- Use a CSS file to set the fonts, colors, and sizes of the elements on your
page.
- Include a link back to your index page.
- The Lotto class object draws the balls with replacement and sorts them in
numeric order before outputting them.
- Extra Credit: Allow the user to choose how many balls from which to draw
and how many balls to draw. This provides a variety of Lotto games to play.
- Grading Breakdown: Functionality: 65%; Layout and Styles: 15%;
Source Code Comments 10%; Source Code Headers 5%; URL Submitted: 5%