// Name: Anita Blake Partner: Ted Forrester // ID: 014916 ID: 642708 // Sec: Yan T 2:30 Sec: Artemov R 1:25 // Date: March 9, 2000 // Project 4: Better Late Than Never (dice, snowmen, Parthons) import java.awt.*; /* Output: 4.1 -- saw 162 sevens 4.3a Ani, 60, no P, no GP, no OS, YC Naj, OC Naj Naj, 40, P Ani, no GP, no OS, YC Wil, OC Sil Wil, 17, P Naj, GP Ani, OS Ur, no YC, no OC Ur, 18, P Naj, GP Ani, OS Sil, no YC, no OC Sil, 20, P Naj, GP Ani, no OS, no YC, no OC 4.3b Tori, 117, no P, no GP, no OS, YC Dana, OC Dana Dana, 95, P Tori, no GP, no OS, YC Lee, OC Jack Lee, 60, P Dana, GP Tori, OS Jack, YC Shannon, OC Robin Shannon, 28, P Lee, GP Dana, OS Robin, YC Kim, OC Kim Kim, 5, P Shannon, GP Lee, no OS, no YC, no OC Robin, 30, P Lee, GP Dana, no OS, no YC, no OC Jack, 74, P Dana, GP Tori, no OS, YC Jamie, OC Jamie Jamie, 37, P Jack, GP Dana, no OS, YC Pat, OC Leslie Pat, 3, P Jamie, GP Jack, OS Chris, no YC, no OC Chris, 7, P Jamie, GP Jack, OS Leslie, no YC, no OC Leslie, 11, P Jamie, GP Jack, no OS, no YC, no OC */ // run Parts 1, 2, 3a, 3b -- core version, with no bonuses public class Project4core { public static void main(String[] args) { Project4_1.main(args); Project4_2.main(args); Project4_3a.main(args); Project4_3b.main(args); } } // simulate 1000 rolls of a pair of dice; print number of sevens class Project4_1 { static void main(String[] args) { int count7 = 0; // # of 7s seen so far int ROLLS = 1000; // # of times to roll the group of dice int GROUPSIZE = 2; // # dice in group for (int i = 0; i