DEV Community

Sewvandi Promodya Wickramasinghe
Sewvandi Promodya Wickramasinghe

Posted on • Updated on

How can object-oriented metric affects to the complexity

Alt Text
We were recently allocated group assignments by our university.

Based on the knowledge gathered from Cyclomatic Complexity (CC) and the Weighted Composite Complexity(WCC) metrics, we have to write a report proposing a new object-oriented(OO) complexity metric.

The new metric should consist of four complexity factors. Out of the four factors, at least two of the factors must be OO specific factors (polymorphism, encapsulation, abstraction, association, aggregation, composition, method chaining, etc). However, we are not allowed to consider inheritance as an OO specific factor.

As in the WCC metric, the newly proposed metric should be able to measure the complexity of each program statement based on all the four factors. In other words, using the newly proposed metric, it should be possible to measure the complexity of a program line by line. In addition, we are required to consider about the practicality of implementing a complexity measuring tool based on the proposed metric. That one should be able to easily develop a complexity measuring tool based on the proposed metric.

We must include following,

1)Explanation of how each factor considered in the new metric affects to the complexity of a program.

2)Explanation of how the new metric captures the complexity introduced by each factor.

3)Explanation of how the new equation was constructed.

4)Calculation of complexity of four different executable java programs using the newly proposed OO metric.

In addition, an explanation of how complexity of each program was calculated should also be included.

Click here to see the answer

Top comments (1)

Collapse
 
Sloan, the sloth mascot
Comment deleted