Analyzing Alternative Class Encapsulations in C++ and JavaEncapsulation is the major means of achieving cohesion in an object oriented program. Suboptimal encapsulation, such as too many objects within a class, unrelated objects within a class, or tightly related objects spread across too many classes, can lead to problems in the extensibility, testability and reuse of the software. Imagix 4D's class level metrics, particularly the Chidamber and Kemerer metrics, provide insight into the overall quality of a system's object oriented design. They also highlight specific areas where coupling and cohesion are a problem. You can then use Imagix 4D source code analysis and visualization features to study the specifics of your code's fundamental design and implementation. The particular focus of this app note is how, working with existing source code, you can experiment with alternative encapsulation strategies and study the impact they would have on your code's architecture.
One of Imagix 4D's built in abstraction features is that symbol level relationships are abstracted to the symbols' containers. So if classA::methodA calls classB::methodB, classA is considered to call classB. The same is true for files. This is the basis of Imagix 4D's Class Calls and File Calls views.