Abstract Class as a Helper Class

If you have different interfaces for the child classes, but you are using the abstract class to factor out duplication within objects, then your abstract class is working as a base class.

classDiagram AbstractBaseThingWithMotor <-- LawnMower AbstractBaseThingWithMotor <-- Car

See if this functionality can be moved to a concrete helper class instead.

classDiagram class LawnMower{ + iMotorHelper motorHelper } class Car{ + iMotorHelper motorHelper } iMotorHelper <-- MotorHelper

References

Nigel Thorne's answer to How to Unit Test Abstract Classes?


Backlinks