SurfaceAreaOfCube.java
/* 
    program that feature two functions to compute the surface area of a cube 
    -the edge length will be read from the standard input stream 
    -the surface area will be printed to the standard output stream 
    -a face of the cube will be modeled as a sample square 
 */
package mathematics;

import shapes.SSquare;

import java.util.Scanner;

public class SurfaceAreaOfCube {
    public static void main(String[] args) {
        double edgeLength = edgeLength();
        double surfaceArea = surfaceArea(edgeLength);
        System.out.println("Surface Area = " + surfaceArea);
    }

    private static double edgeLength(){
        System.out.print("Please enter the edge length of the cube: " );
        Scanner scanner = new Scanner(System.in);
        double edgeLength = scanner.nextDouble();
        return edgeLength;
    }

    private static double surfaceArea(double edgeLength) {
        SSquare face = new SSquare(edgeLength);
        int nrOfFaces = 6;
        double surfaceArea = face.area() * nrOfFaces;
        return surfaceArea;

    }



}