finished Cube.java