State the process of Rearranging Classes and Operations
The various, yet similar operation of different classes can be slightly modified thus that they can be covered by a single inherited operation. The chances of inheritance can be increased by following types of adjustments:
i) Some operations require fewer arguments than other similar operations, such as drawing an object, e.g. circle, triangle, etc. with or without colour fill. So, the attribute colour can be accepted or ignored for consistency with colour displays.
ii) Some operations require less argument than other, as they are special case of general arguments. So, varied newer operation can be implemented by calling general operation and new argument values. For instance, insertion in the beginning or in the end of the list are special cases of insertion in the list.
iii) Different classes can have similar attributes, but dissimilar names. Therefore, they can be combined and placed in base class so that operation to access attribute may match in different classes.
iv) Sometimes an operation is needed by a subset of classes. In this case, declare operation in base class and all those derived classes which do not need it can be declared as no-operation.