Lecture overview -- Keyboard shortcut: 'u'  Previous page: Specialization of Collections -- Keyboard shortcut: 'p'  Next page: Overview of the class <b><kbd>List<T></kbd></b> -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 11 : 36
Object-oriented Programming in C#
Collection Classes
Specialization of Collections - a realistic example

An AnimalFarm class with auto insertion of animals of opposite sex

An AnimalFarm class in which removal and clearing is denied

An AnimalFarm class that extends Collection<Animal> with GetGroup

/user/normark/oop-csharp-1/sources/c-sharp/collections/collection/1/animal.csThe class Animal - Unchanged.


/user/normark/oop-csharp-1/sources/c-sharp/collections/collection/1/farm.csThe class AnimalFarm - a subclass of Collection<Animal>.


/user/normark/oop-csharp-1/sources/c-sharp/collections/collection/1/prog.csA sample client of AnimalFarm.


/user/normark/oop-csharp-1/sources/c-sharp/collections/collection/1/outputOutput from sample client of AnimalFarm.