Hint for Homework assignment H01

You can simulate rolling one die by choosing one of the integers 1, 2, 3, 4, 5, or 6 at random. The number you pick represents the number on the die after it is rolled. As pointed out in Section 2.5.6, the expression

    (int)(Math.random() * 6) + 1

does the computation to select a random integer between 1 and 6.