public class Rectangle { // data members private int length; private int width; // Constructor public Rectangle() { length = 0; width = 0; } public Rectangle(int l, int w) { length = l; width = w; } // methods public void setLength(int l) { length = l; } public void setWidth(int w) { width = w; } public int getLength() { return length; } public int getWidth() { return width; } public int computePerimeter() { return 2*width + 2*length; } public int computeArea() { return width * length; } public void print() { System.out.println("Width=" + width + ", Length="+ length); } public void printAll() { System.out.print("Width=" + width + ", Length="+ length); System.out.println(", Area=" + computeArea() + ", Perimeter="+ computePerimeter()); } }