1 /* 2 Program to calculate the white space on a die of given edge lenth and dot diameter 3 -Note: Standard value for DotDiameter is 1/8*EdgeLength 4 */ 5 6 7 package shapes; 8 9 public class WhiteArea { 10 public static void main(String[] args) { 11 12 // The input parameters 13 double EdgeLength = 0.75; 14 double DotDiameter = 0.75/8; // Standard is 1/8 of edge length 15 double NumberOfDots = 21; // Total of all Dots on the die (Standard is 21) 16 17 //The Objects 18 SSquare DieFace = new SSquare(EdgeLength); 19 SCircle DieDot = new SCircle(DotDiameter); 20 21 //The Calculation and output 22 double WhiteArea = (6*DieFace.area() - NumberOfDots*DieDot.area()); 23 System.out.println("The White Area is: " + WhiteArea); 24 } 25 } 26