Wednesday, February 4, 2009

public class Cube {public static void main(String[]args){
private double area; private double width; private double heigth; private double length;
public void setLength(double l){ length=l; } public void setWidth(double w){ width=l; } public void setHeigth(double h){ heigth=l; public double displayVolume(){ double volume=length*width*heigth; System.out.println("The Volume of the cube is"+volume);
} }
}}

No comments:

Post a Comment