To: The Summer 1998 CS 299 -Programming in Java- Class
From: Clifton, Scanlan
Date: June 11, 1998
RE: Program 2
Due Date: June 17, 1998 -Start of class
Grace Date: June 19, 1998 - 3:15 p.m., Slide it under my door if I am not there!
Points: 25

You must turn in:
  • A) A diskette with and TDice.html in the top-level directory
  • B) A print-out of your file (class name is TDice)

    You are going to write a java applet to roll some dice. You MUST have several appropriate methods - no one method should be very long. Break it into small, well-focused pieces.

    You must have two buttons:
  • 1) Roll Fair Dice
  • 2) Roll Loaded Dice

    When "Roll Fair Dice" is clicked, roll two dice as you did for exercise 5.15, but display the results using graphics making two squares representing the dice and the "dots" in the squares corresponding to the "rolled" number.

    When "Roll Loaded Dice" is clicked, display either a 7 or 11, with 50/50 probability for each. Your graphics MUST look like real dice, with the dots in the right places.