Explanation
Line 2 – 4: Initialized car properties
Line 6 – 8: printDetails() prints the properties of Car.
Line 12 – 16: start() and stop() functions defined with their respective outputs
Line 20 – 22: Initializer for Sedan defined, which also refers to the parent class initializer using super()
Created an object of SedanEngine and assigned it to the Sedan instance property engine.
Line 24 – 25: start() method of SedanEngine object is called to start the car.
Line 27 – 28: stop() method of SedanEngine object is called to stop the car.