Ad
  • Default User Avatar

    Thanks for this kata. Some comments:

    • Make the tests adhere to the given interfaces. Currently the tests require certain getters to be defined in the implementations, making polymorphism impossible. I would like to have a member IEngine* in Car, and IFuelTank* in Engine. That way it is easier to swap out the engine for a V12Engine when required :)
    • The members of FuelTank/IFuelTank are unnecessary. Whether fuel is above or under reserve can be calculated in runtime, so these cached values do not need to pollute the interfaces.
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution