Inheritance
- One class can serve as a base class for defining a new, more restricted class called a subclass.
- Any instance of a (derived) class inherits the data members and method members of its parent class.
- A subclass typically provides additional member variables and methods.
- A subclass may override a member inherited from its parent by redefining it.
- An abstract class doesn’t provide full implementations of all of its methods and is typically used as a means to provide a uniform protocol to two or more separate subclasses.
- The visibility of names within and across inheritance hierarchies is controlled by the keywords public, private, protected. The default access control is “package” which itself defaults to accessibility within compilation units.