Certain classes are meant to be used as base classes. For example, in the case of a banking application, a developer may define a class called Account that has default implementations for methods like MakeDeposit and GetBalance . However, the intention of the class may be for other developers to build derived classes like Checking and Savings. You can require developers to derive from your class and prevent developers from creating instances of the class directly. To require inheritance in your class:
Tip
|