| 1 | /** |
| 2 | This program simulates casting a die ten times. |
| 3 | */ |
| 4 | public class DieTest |
| 5 | { |
| 6 | public static void main(String[] args) |
| 7 | { |
| 8 | Die d = new Die(6); |
| 9 | final int TRIES = 10; |
| 10 | for (int i = 1; i <= TRIES; i++) |
| 11 | { |
| 12 | int n = d.cast(); |
| 13 | System.out.print(n + " "); |
| 14 | } |
| 15 | System.out.println(); |
| 16 | } |
| 17 | } |