nstudent smith("Joe
Smith", 5000, "UT");
nstudent s(smith); s.statement();
n
nchecking c; c = s; c.statement();
n
naccount a; a = s; a.statement();
n
nWhen a student object is initialized/assigned to a checking or account object, we lose the derived
parts.
nWhen we use the statement member function, the function used is based on the type of the object.
nFor the checking object, the checking's statement member function is used. For the account object, the account's statement member function is used.
nThese are statically bound by the compiler based on the type of the object.