Lecture overview -- Keyboard shortcut: 'u'  Previous page: Extension of Classes -- Keyboard shortcut: 'p'  Next page: The intension of class extensions -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Specialization, Extension, and Inheritance - slide 11 : 40

An example of simple extension
We extend the 2D Point class to a 3D Point class
Point.cs
The class Point2D.
Point3D.cs
The class Point3D which extends class Point3d.
Client.cs
A client of the classes Point2D and Point3d.
output
The output from the Client program.
Go to exercise
Point3D: A client or a subclass of Point2D?

The class Point2D was a convenient starting point of the class Point3D

We have reused some data and operations from class Point2D in class Point3D