Insights on Composition over Inheritance

Problem Statement ‘a subclass inherits inappropriate operations from a superclass’ Background The prime motivation for inheritance and composition in object oriented is code reuse [3]. With inheritance, modifications on the superclass would lead to modifications of the subclass because of the implicit self-recursive re-entrant invocations [1]. Such invocations can hinder the evolution of the model.…