class Box
{
double width;
double height;
double depth;
}
class BoxDemo
{
public static void main(String arg[])
{
Box mybox=new Box();
double vol;
mybox.width=5;
mybox.height=10;
mybox.depth=15;
vol=mybox.width*mybox.height*mybox.depth;
System.out.println("Volume"+vol);
}
}
Thursday, 6 June 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment