I'm suppose to identify 3 CK metrics and the most appropriate class to refactor so as to increase encapsulation, modularity and reduce the complexity of the following project
According to my research, from the original metrics proposed by C&K the coupling of objects and lack of cohesion of methods impact all 3 factors and I also chose the weighted methods per class which impacts complexity.
After an initial analysis the
Vehicle class has the highest values for almost all metrics, some of them are significantly higher (e.g LCOM=95 while the average is 5.7), so I think this is the right class to tackle.
No spec was given, just the code and the UML diagram above and my problem is that I don't see how I could restructure the code so as to lower these metrics.
Any suggestions, examples?