1 package Shapes; 2 3 import shapes.SCircle; 4 import shapes.SSquare; 5 6 public class WhiteArea { 7 public static void main (String[] args){ 8 SSquare faceodie = new SSquare(19); 9 System.out.println("Die edge length " +faceodie.toString()); 10 System.out.println("Single side area " +faceodie.area()); 11 12 // Can you get 1/8th of the 19mm without doing the math yourself? 13 SCircle diedot = new SCircle(2.375); 14 System.out.println("Radius of a dot "+diedot.toString()); 15 System.out.println("Perimeter of a dot "+diedot.perimeter()); 16 System.out.println("Area of a dot "+diedot.area()); 17 18 //Getting the numbers and white area 19 double diearea = (+faceodie.area()*6); 20 System.out.println("Full area of die "+diearea); 21 // 21 dots on die 22 double areaodot = (+diedot.area()*21); 23 System.out.println("Area of dots " +areaodot); 24 double areaofwhitespace = (+diearea- +areaodot); 25 System.out.println("Area of the white space "+areaofwhitespace); 26 27 28 } 29 30 } 31