-
Car:
- Attributes: Make, model, Engine object, Transmission object.
- Methods:
- Constructor to initialize car attributes.
- Start the car.
- Stop the car.
-
Engine:
- Attributes: Type, horsepower.
- Methods:
- Constructor to initialize engine attributes.
- Start the engine.
- Stop the engine.
-
Transmission:
- Attributes: Type.
- Methods:
- Constructor to initialize transmission attributes.
- Shift gear.
- Each car consists of an engine and transmission objects.
-
Car Operations:
- Start the car by starting the engine.
- Stop the car by stopping the engine.
-
Engine Operations:
- Start the engine to power the car.
- Stop the engine to turn off the car.
-
Transmission Operations:
- Shift gears for acceleration or deceleration.