Lab 4
 

Exercise 4.1

In chapter 7 of Java for Students, there is a dice throwing program.  Convert the applet to a stand alone program.  Chapter 18 in Java for Students describes how to do the conversion from applets to stand alone programs.  Use two text fields with appropriate labels to display the dice digits.  Also make a separate Die.class that simulates the roll of the die.  Each dice should be an object of the class Die.

Here is the original program which is an applet that will run in a browser:
Ex4_1a.java

This browser does not have Java installed.

Here is the finished result.  This is a standalone program (cannot be run in a browser).
DiceRoll.class
Die.class