Class LCOM96a

LCOM96a (Lack of Cohesion of Methods, Handerson et al., 1996)

Formula: LCOM96a = (1/(1-m)) * ((1/a) * Σ(μ(A)) - m) for all attributes A

Where:

  • a is the number of attributes (fields) in the class
  • m is the number of attributes (fields) in the class
  • μ(A) is the number of methods that access an attribute (field) A
  • The formula measures how methods are connected through attributes

Returns a value >= 0:

  • 0: perfect cohesion
  • Higher values: increasing lack of cohesion

Implements

Constructors

Properties

Methods

Constructors

Properties

name: string = 'LCOM96a'
description: string = 'Lack of Cohesion of Methods (Handerson et al., 1996a) - Measures attribute sharing among methods'

Methods