#include using namespace std; // one class delegating another // myClassDelegation1.cpp class Engine { public : void start() { cout<<"\n car started";} void stop() { cout<<"\n car stopped";} }; class Car { private: Engine _mcareng; public: void remote_start() { _mcareng.start(); } void remote_stop() { _mcareng.stop(); } }; int main() { Car car; car.remote_start(); car.remote_stop(); return 0; }