class box
{
private double length;
private double width;
private double height;

box(double l,double w, double h) throws zero_or_negative_sizeException
{ if(l<=0 || w<=0 || h<=0) throw new zero_or_negative_sizeException();
  else
  {
  length=l;
  width=w;
  height=h;
  }
}

box(box bi) throws zero_or_negative_sizeException
{if(bi.length<=0 || bi.width<=0 || bi.height<=0) throw new zero_or_negative_sizeException();
  else
  {
  length=bi.length;
  width=bi.width;
  height=bi.height;
  }
}

// This methods are written to access private length, 
// width and height variables
public double read_length() {return length;}
public double read_width() {return width;}
public double read_height() {return height;}
//This methods are written to change private length, 
// width and height variables
public void write_length(double l) throws zero_or_negative_sizeException 
{if(l<=0 ) throw new zero_or_negative_sizeException();
length=l;
}
public void write_width(double w) throws zero_or_negative_sizeException
{if(w<=0 ) throw new zero_or_negative_sizeException();
width=w;
}
public void write_height(double h) throws zero_or_negative_sizeException
{if(h<=0 ) throw new zero_or_negative_sizeException();
height=h;
}



double volume()
{return length*width*height;}

public String toString()
{ String s="";
  s+="length = "+length+"\n";
  s+="width = "+width+"\n";
  s+="height = "+height+"\n";
  s+="Volume = "+volume()+"\n";
  return s;
}

}