Lecture overview -- Keyboard shortcut: 'u'  Previous page: Cloning in C# -- Keyboard shortcut: 'p'  Next page: The fragile base class problem -- 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 32 : 41
Object-oriented Programming in C#
Abstract classes, Interfaces, and Patterns
Cloning versus use of copy constructors

Cloning with obj.Clone() is more powerful than use of copy constructors, because obj.Clone() may exploit polymorphism and dynamic binding

/user/normark/oop-csharp-1/sources/c-sharp/point/cloneable-vs-copy-constructor/Point.csA cloneable class Point.


/user/normark/oop-csharp-1/sources/c-sharp/point/cloneable-vs-copy-constructor/Point.csA cloneable class ColorPoint.


/user/normark/oop-csharp-1/sources/c-sharp/point/cloneable-vs-copy-constructor/Client.csPolymorphic Cloning of Points.


/user/normark/oop-csharp-1/sources/c-sharp/point/cloneable-vs-copy-constructor/AlternativeClient.csNon-polymorphic Cloning of Points - with use of copy constructors.


/user/normark/oop-csharp-1/sources/c-sharp/point/cloneable-vs-copy-constructor/outputOutput of both polymorphic and non-polymorphic cloning.