How to detect all possible code smells in a class diagram?
I am taking a course about detecting code smells and refactoring bad code. I came across the following class diagram which supposedly have some design/flaws and needs refactoring.
Class Diagram
So far, I have detected the following code smells:
Remove Manager and Associate subclass. Justification - These subclasses do not provide any additional information.
Inline class for Customer and Membership. Justification - Membership class lacks remove method, we would need to remove membership ID object when corresponding Customer object is deleted. I have same thinking process for add method but in doubt.
I have following three questions on this:
Is my thinking process correct, specially regarding justifications?
Are there any other code smells in the diagram?
Is there a structured way/process to detect all code smells in a design/project/code?