/* Author : Michael Robinson Program : array3d.java Purpose : To present the three dimensional arrays by building a multi-floor, multi- row, multi-apartment building. Updated : Jan 29, 2011 */ public class array3d { public static void DisplayStatistics( int floors, int rows, int columns ) { System.out.println( "\n This is a building with:" ); System.out.printf( " %3d Floors \n", floors ); System.out.printf( " %3d Rows \n", rows ); System.out.printf( " %3d Columns\n", columns ); System.out.printf( " %3d Total Amount of Apartments\n", ( floors * rows * columns ) ); System.out.println( " Created using a 3 Dimensional Array\n" ); }//end public static void DisplayStatistics( int floors, int rows, int columns ) public static void cubeBuilding( int floors, int rows, int columns ) { //create a three dimensional array of String data type String array3D[][][] = new String[floors] [rows][columns]; int x=0; //create and initialize variable x for floors int y=0; //create and initialize variable y for rows int z=0; //create and initialize variable z for columns int units=0; //create and initialize variable units DisplayStatistics( floors, rows, columns ); //load data into array for( x=0; x " ); System.out.print( " Floor = " + (x+1) + " Row = " + y + " Col = " + z ); }//end for( z=0; z