First page Back Continue Last page Graphics
polymorphic functions
The two different prototypes for ViewAcct imply there will be two different function definitions.
- Brass::ViewAcct( )
- BrassPlus::ViewAcct( )
The driver will use the object type to choose.
- Brass blue(...);
- BrassPlus yellow(...);
- blue.ViewAcct( ); // use Brass::ViewAcct( )
- yellow.ViewAcct( ); // use BrassPlus::ViewAcct( )
similarly for Withdraw( );