August 2001
Beginner
482 pages
10h 52m
English
A Dog object has access to all the member functions in class Mammal, as well as to any member functions, such as WagTail(), that the declaration of the Dog class might add. It can also override a base class function. Overriding a function means changing the implementation of a base class function in a derived class. When you make an object of the derived class, the correct function is called.
When a derived class creates a member function with the same return type and signature as a member function in the base class, but with a new implementation, it is said to be overriding that method. |
When you override a function, it must ...
Read now
Unlock full access