Assignment from C# book using inheritance