A class X has 12 operations. Cyclomatic complexity has been computed for all operations in the OO system, and the average value of module complexity is 4. For class X, the complexity for operations 1 to 12 is 5, 4, 3, 3, 6, 8, 2, 2, 5, 5, 4, 4, respectively. Compute the weighted methods per class.

What will be an ideal response?


Assume that n methods of complexity c1, c2, . . . , cn are defined for a class C. The specific complexity metric that is chosen (e.g., cyclomatic complexity) should be normalized so that nominal complexity for a method takes on a value of 1.0.

 WMC = ?S ci    for i = 1 to n. 

The number of methods and their complexity are reasonable indicators of the amount of effort required to implement and test a class.

Computer Science & Information Technology

You might also like to view...

A structure that has a(n) ______________ is not a tree.

A. cycle B. node C. edge D. leaf

Computer Science & Information Technology

The Web, as a computing platform that supports software applications and the sharing of information among users, is referred to as _____.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The Decrease Indent and Increase Indent buttons change the indents by ________ tab intervals

A) 1/4 inch B) 1/2 inch C) 1 inch D) 2 inch

Computer Science & Information Technology

Shannon’s theorem, which is known as Shannon Channel Capacity, has helped us to determine the data rate based on given ____________________ and signal to noise ratio.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology