/* program that features 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 simple square. */ package mathematics; import shapes.SSquare; import java.util.Scanner; public class SurefaceAreaOfCube { public static void main (String[] args){ double edgeLength = edgeLength(); double surfaceArea = surefaceArea(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 surefaceArea(double edgeLength) { SSquare face = new SSquare(edgeLength); int nrOfFace = 6; Double surefaceArea = face.area() * nrOfFace; return surefaceArea; } }