import java.io.*;
 public class Cuboid{
        int length, width, height;
        public Cuboid (int l, int w, int h){ length = l; width = w; height = h;}
        public Cuboid (int l, int h){  length = width = l;height=h;}
        public Cuboid (int h){ length=width=height=h;}
        public void setLWH(int l, int w, int h){ length = l; width = w; height = h;}
        public int volume(){  return length * width * height;  }
         public int surfacearea(){return 2 * (length * width + width * height + length * height); }
         public void display(){
	      System.out.println("Length = " +length+" ,  Width = " +width+ " ,  Height ="+height);
	      System.out.println("Volume = " +volume()+ " ,  SurfaceArea ="+surfacearea());
          }
          public static void main(String args[]){
	        Cuboid c1, c2, c3;
	        int vol, area;
	        c1 = new Cuboid (1,2, 3); c2=new Cuboid (1, 3);  c3=new Cuboid (3);
	        vol = c1.volume() + c2.volume() + c3.volume();
	        area = c1.surfacearea() + c2.surfacearea() +c3.surfacearea();
	        c1.display();
	        c2.display();	
	        c3.display();
	        System.out.println("Total Volume=" +vol +" , Total surfacearea="+area);
        }
 }
