#include <iostream>

class base {
       virtual void time_impl()=0;
  public:
       void time() {
             //Default behaviour
             std::cout << "Hello ";
             //Call overridden behaviour
             time_impl();
       }
  };

  class child : public base {
       void time_impl() {
           std::cout << "world\n";
       }
  };
  
  int main () {
      child c;
      c.time();
  }