class assignment to show inheritance in c#