public class Box
{
// Instance Variables
double length ;
double width ;
double height ;
// Constructors
public Box ( double side )
{
width = side ;
height = side ;
length = side ;
}
public Box(double length, double height, double width)
{
this.length=length;
this.width=width;
this.height=height;
}
// Methods
double calculate()
{
return 2 * ( width * height +
width * length +
height * length ) ;
}
double volume(){
return (width*length*height);
}
public String toString(){
return ("sunolikh epifaneia:" + calculate() + "ogkos:" + volume() );
}
}