public static void Main()
Book book = new Book("Joel Jimenez", "C#", 4);
Rectangle rec = new Rectangle(5, 9, "Rectangle");
public Document(string author, string title) {
public string getAuthor() {
Console.WriteLine("Author: " + getAuthor());
Console.WriteLine("Title: " + this.title);
public Book(String author, string title, int edition): base(author, title) {
public int getEdition() {
public void displayRecord() {
Console.WriteLine("Edition: " + getEdition());
private string shape_name;
public abstract double getArea();
public string shapeName { get; set;}
private int length, width;
public Rectangle(int l, int w, string shape_name) {
this.shapeName = shape_name;
public override double getArea() {
return this.length * this.width;
public void displayShape() {
Console.WriteLine(this.shapeName);
Console.WriteLine(getArea());