/* * A program that computes the AREA of a standard die. */ package shapes; public class WhiteArea { public static void main(String[] args){ // Declaring basic valuables. double EdgeLength = 0.75; double DotDiameter = (EdgeLength / 8.0); SSquare DieFace = new SSquare(EdgeLength); SCircle DieDot = new SCircle((DotDiameter/2)); // Calculate the white areas of each face double WhiteArea = DieFace.area() * 6; double DotArea = DieDot.area() * (1 + 2 + 3 + 4 + 5 + 6); // Calculate the total white area of a standard dice. double ResultWhiteArea = WhiteArea - DotArea; // Displays the TotalWhiteArea. System.out.println("The total white area of a standard die is " + ResultWhiteArea + " square inches"); } }