Description:
MUOS detects if the behavior of a superclass is relevant only for one of its subclasses. It is then suggested to move it to that subclass.
Example:
In the following example, the message getQuota is declared by Employee but it is sent to Salesman objects only.
class Employee {
int getQuota() { return quota; }
...
// getQuota() is not used by Employee
}
class Salesman extends Employee {
void f() {
int quota = getQuota();
}
}
class Engineer extends Employee {
void f(Salesman s) {
int quota = s.getQuota();
}
}