class basic_rectangle {
    // protected allows subclass to access attributes
    protected int width, height;
    public basic_rectangle(int width, int height) {
	this.width = width; this.height = height;
    }
}

class rectangle extends basic_rectangle {
    public rectangle(int width, int height) {
	// call constructor of super class
	super(width, height);
    }
    public int area() {
	return width * height;
    }
}

public class inheritance {
    public static void main( String[] args ) {
	rectangle R = new rectangle(6, 7);
	System.out.println(R.area());
    }
}
