Lab 7 - Inheritance and Polymorphism

In this lab, you'll explore how to define a base and two subclasses, exploring inheritance.  The topics of abstract classes and base constructor invocation will also be demonstrated.  Finally, we'll explore polymorphism briefly.  Specifically, you'll develop a small console application that defines a Monster class and define two classes, Dragon and Orc, that inherit from Monster.  We'll then instantiate objects of the Dragon and Orc class and then create a list of Monsters.

This lab is broken into two parts, and you should view each part and attempt to replicate what is shown in this example.

Click this how-to to see a step-by-step solution for part one of the lab.

Click this how-to to see a step-by-step solution for part two of the lab.


Wrapping it all up

Click her to see the finished ZIPed solution.