Sometimes you write code that looks and feels right at the time, but in using it later you find that something is not quite right.
This is the case with the
extension you used to make Car conform to Vehicle.
When you made Car conform to the Vehicle protocol, you added a numberOfDoors computed property that always returns
This effectively makes numberOfDoors a constant on Car.
As a consequence, the
if/else condition in kind will always return .sedan.
There is no other possibility due to how Car conforms to Vehicle.
Refactor Car to have a constant stored property named numberOfDoors. Note: This change will mean that you need to make other changes. Use the compiler errors to guide your solution.