public static void Main()
Console.WriteLine("***** in Main() method");
Character hero = new Character("Hero John", 100, "hero");
Character zombie = new Character("Mad Dave", 80, "boring zombie");
Zombie zom = new Zombie("New Dave", 70, "mega zombie");
Vampire vamp = new Vampire("Drac", 90, "Bloodthirsty Vamp");
public Character(string n, int h, string d)
Console.WriteLine("\n***** in CHARACTER constructor, creating an object of type " + GetType().ToString().ToUpper() + " - " + desc.ToUpper());
public string getDescription()
public virtual void talk()
Console.WriteLine("\nI am a " + desc + " and I am talking");
public Zombie(string n, int h, string d) : base (n, h, d)
Console.WriteLine("\n***** in ZOMBIE constructor, creating an object of type " + GetType().ToString().ToUpper() + " - " + d.ToUpper());
public override void talk()
Console.WriteLine("\nI am a " + this.getDescription() + " and I will eat your brains!");
Console.WriteLine("\nYum!!! Brains!!!!");
class Vampire : Character
public Vampire(string n, int h, string d) : base (n, h, d)
Console.WriteLine("\n***** in VAMPIRE constructor, creating an object of type " + GetType() + " - " + d.ToUpper());
public override void talk()
Console.WriteLine("\nI am a " + this.getDescription() + " and I will suck your blood!");
Console.WriteLine("\nMmmmmm!!! Blood!!!!");