Practice ยท 3 of 3
Composition: a Car HAS an Engine
Implement class Engine with void start(), bool running() const (private bool running_{false};), and class Car that owns an Engine engine_ member plus std::string model_;, with void drive() (starts the engine) and bool ready() const (engine running).
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: static members and this