CIS 375 SOFTWARE ENGINEERING

UNIVERSITY OF MICHIGAN-DEARBORN

DR. BRUCE MAXIM, INSTRUCTOR

Date: 12/1/97

Week 13

OBJECT-ORIENTED METRICS:

  • How is O.O. software different:
    1. Localization.
    2. Encapsulation.
    3. Information hiding.
    4. Inheritance.
    5. Abstraction.
  • CLASS METRICS:

    1. CK metrics suite:
      1. Weighted Methods per class (WMC).
      2. Depth of inheritance tree (DIT).
      3. Number of children (NOC).
      4. Coupling between object classes (COB).
      5. Response for classes (RFC)
      6. Lack of cohesion in methods (LCOM)
    2. Lorenz & Kidd metrics:
      1. Class size (CS).
      2. # of operations overridden by subclass (NOO).
      3. # of operation added by subclass (NOA).
      4. SI = [NOO * level]/Mtotal # class methods.

    OPERATION-ORIENTED METRICS:

    1. Average operation size (OSavg).
    2. Operation complexity (OC).
    3. Average # of parameters per operations (NPavg).

    OPERATION-ORIENTED METHODS:

    1. Encapsulation:
    2. LCOM.
    3. Percent public & protected (PAP).
    4. Public access to data members (PAD).
    5. Inheritance:
    6. # root classes (NOR).
    7. Fan in (FIN).
    8. # of children (NOC).
    9. Depth of inheritance tree (DIT).