Challenge 1: Cars and Engines!

In this exercise, you have to perform a composition between a sedan car class and its engine.

Problem statement

You have to implement a Sedan class, which inherits from the Car class and contains a SedanEngine object.

Note: In such a composition relation, the Sedan class will be responsible for SedanEngine lifetime.

Consider this diagram for reference:

Get hands-on with 1400+ tech skills courses.