Week 7

This week we reviewed object-oriented concepts (encapsulation, composition, inheritance and polymorphism) and learned how these work in C# with examples below. We learned the is-as operators which are unique to C#. We also looked at how operator-overloading is implemented in C# (see ComplexNumber example below). We also looked at a new .NET 3.5 feature called extension methods.

Powerpoint files

classes2

C# codes discussed in class

composition

basepluscommisionemployee

polymorphism

payrollsystem

interface

complexnumber