In repeated inheritance , the same operation occurs in both parents which in turn have a common ancestor. Mixin Inheritance is multiple inheritance in which one or more of the parent abstractions cannot have instances of their own and exist only to provide a set of properties for abstractions inheriting from them. Covariance causes problems when it is used in the traditional way to make the range of a component narrower. Since restrictive covariance is a form of subtyping, the subtype should be able to do everything that the superclass can do. The problem may arise because the superclass was imprecise.
Restrictive covariance is unnecessary when the superclass is defined properly.
Composition is a stronger form of aggregation whereby the aggregate class owns the component class exclusively. Return to the Module Main Page.