There are three classes: Car, Engine and Wheel. Make class Car
immutable.
- Implement method
changeEngine(Engine engine)
, that will allow you to upgrade your car, and you will be like Vin Diesel:) - Implement method
changeColor(String newColor)
. - Implement method
addWheel(Wheel newWheel)
. Our car can have as many wheels as possible. Even 10 wheels)