Wednesday, February 4, 2009

*/import java.util.Scanner;public class CubeTester{
/** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner scan= new Scanner(System.in); Cube MyCube1= new Cube(5,5,5); Cube MyCube2= new Cube(); System.out.println("The Volume of the cube is" +volume); System.out.println("Enter a value for your width"); double w =scan.nextDouble(); System.out.println("Enter a value for your heigth"); double h =scan.nextDouble(); System.out.println("Enter a value for your length"); double=scan.nextDouble(); double 1=scan.nextDouble(); MyCube2.setDimensions((w,h,l)); System.out.println(The volume of the cube is" +volume);}

No comments:

Post a Comment