CS1 Standard Demo Page

The following text was written to the standard output stream when the WhiteArea.java program was executed from Netbeans.

/*
 * Program to calculate area of a die not obscured by any black dots. 
 */
package shapes;

/**
 *
 * @author ecuevas
 */
public class WhiteArea {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // VARIABLES
        double dieEdgeLength = 1.25;
        double dotDiameter = (dieEdgeLength/7);
        double dotRadius = (dotDiameter/2);
        
        //SHAPES
        SSquare dieFace = new SSquare(dieEdgeLength);
        System.out.println("die edge length = " + dieFace.toString());
        System.out.println("area of one die face = " + dieFace.area());
        
        SCircle dot = new SCircle(dotRadius);
        System.out.println("dot radius" + dot.toString());
        System.out.println("area of one dot = " + dot.area());
        
        
        //COMPUTATIONS
        double areaOfDots = (21 * dot.area()); 
        System.out.println("area of dots combined = " + areaOfDots);
        
        double areaOfDieFaces = (6 * dieFace.area());
        System.out.println("area of die faces combined = " + areaOfDieFaces);
        
        double two = (areaOfDieFaces - areaOfDots);
        System.out.println("area of white space on die = " + two);
        
    
        
        
        
        
        
       
        
               
    }
    
}