package cn.edu.bjut.chapter4; public class Rectangle { protected int length, width; public Rectangle(int length, int width) { this.length = length; this.width = width; } public int area() { System.out.println(this.getClass().getName()); return (length * width); } public int perimeter() { System.out.println(this.getClass().getName()); return (2 * (length + width)); } }