class getset {
private int l, b, h;
void setLength(int l)//l=5
{
this.l = l;//this.l=5
}
String getLength()
{
return l + "M";
}
void setBreadth(int b) {
this.b = b;
}
String getBreadth() {
return b + "M";
}
void setHeight(int h) {
this.h = h;
}
String getHeight()
{
return h + "M";
}
String FindVolume() {
return l * b * h + "Cu.M";
}
public String toString() {
String b = String.format("Length=%s\n,Breath=%s\n,Height=%s\n,the total is %s", getLength(), getBreadth(),
getHeight(), FindVolume());
return b;
}
}
class getset1 {
public static void main(String[] args) {
getset g = new getset();
Scanner s=new Scanner(System.in);
System.out.println("enter l value");
int l=s.nextInt();
g.setLength(l);
g.setBreadth(4);
g.setHeight(5);
System.out.println(g);//call the toString method
}
}