Lecture overview -- Keyboard shortcut: 'u'  Previous page: Interfaces in C# -- Keyboard shortcut: 'p'  Next page: Interfaces from the C# Libraries -- 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    Abstract classes, Interfaces, and Patterns - slide 13 : 37

Examples of Interfaces
Two or more unrelated classes can be used together if they implement the same interface
gameobject.cs
The interface IGameObject.
die.cs
The class Die which implements IGameObject.
PlayingCard.cs
The class Card which implements IGameObject.
client.cs
A sample Client program of Die and Card.
output
Output from the sample Client program of Die and Card.
In the example above, the GameObject could as well have been implemented as an abstract superclass
Go to exercise
An abstract GameObject class