using System;
namespace Inherit {
public class Shape {
public void setWidth(int w) {
width = w;
}
public void setHeight(int h) {
height = h;
protected int width;
protected int height;
public class Rectangle: Shape {
protect int area;
public int getArea() {
area = width * height;
public void Display() {
Console.WriteLine(area);
public class RectTester {
static void Main(string[] args) {
Rectangle r = new Rectangle();
r.setWidth(5);
r.setHeight(7);
r.getArea();
r.Display();