public class Cuboid { Rectangle rec; int length; public Cuboid(int l, int w, int h) { rec = new Rectangle(w,h); length = l; } public int getLength() { return length; } public void setLength(int l) { length = l; } public int volume() { return length * rec.area(); } }