1 /* 2 * a program to compute the white area of a standard white die with black dots 3 */ 4 5 package shapes; 6 7 public class WhiteArea { 8 public static void main(String[] args) { 9 //name the values 10 double edgelength = .75; 11 double blackdot = (1/8 * .75); 12 //Model objects 13 SSquare dieface = new SSquare(edgelength); 14 SCircle diedot = new SCircle(blackdot * .50); 15 //solution 16 double dieArea = dieface.area(); 17 double dotArea = (diedot.area() * 21); 18 double whitearea = (dieArea - dotArea); 19 System.out.println("The white area of a standard white die with black dots is " + whitearea); 20 21 22 23 24 } 25 } 26