The MOOD Metrics Suite
Number of Methods Inherited b b In order to determine the number of methods inherited, the Software Engineer must do the following, – –Obtain the class to be processed and parent classes CRC cards. – –Pick a method in the parent class and check to see if it is also defined in the the new class. – –If so, add one. – –Repeat until all methods have been processed. – –Enter number into cell.
Number of Methods b b In order to determine the number of methods, the Software Engineer must do the following, – –Obtain the current classes CRC card. – –Count the number of methods. – –Input count into cell.
Number of New Methods b b In order to determine the number of new methods, the Software Engineer must do the following, – –Obtain the class to be processed and parent classes CRC cards. – –Pick a method in the parent class and check to see if it is also defined in the the new class. – –If not, add one. – –Repeat until all methods have been processed. – –Enter number into cell.
Formula for Calculations b SI = [NOO X level/ M total b Specialization index X degree of specalization / Total # of Methods MIF = M i (C i ) / M a (C i ) b Method Inheritance Factor = sum number of methods inherited / sum number of methods MIF = M o (C i ) / M n (C i ) X DC(C i ) b Method Inheritance Factor = sum number of overriding methods / sum number of new methods X descendents count