Introduction to OOP Chapter 16: Overriding : next previous audio real text

Simulating Refinement with Replacement

In most languages the most important features of a refinement can be simulated, even if the language uses replacement.
void Parent::example (int a) {
    cout << "in parent code\n";
}

void Child::example (int a) {
    Parent::example(12); // do parent code
    cout << "in child code\n"; // then child code
}
Note that this is not quite the same as Beta, as here the child wraps around the parent, while in Beta the parent wraps around the child.
Intro OOP, Chapter 16, Slide 16