public Shape (string name)
public void setName(string name)
public class Rectangle : Shape
public Rectangle (String n, int a, int b)
public void setLength(int x)
public void setWidth(int y)
int area = length * width;
public static void Main()
Rectangle r1 = new Rectangle();
Console.WriteLine("Name = '{0}', Length = {1} , Width = {2}" ,r1.getName(), r1.getLength(), r1.getWidth());
Console.WriteLine("\n-----------Next OBJ---------------------\n");
Rectangle r2 = new Rectangle("Rectangle 2", 4, 6);
Console.WriteLine("Name = '{0}', Length = {1} , Width = {2}" ,r2.getName(), r2.getLength(), r2.getWidth());