Class LCOMStar

LCOM* (Fernandez & Pena, 2006) - also known as LCOM-star

Formula: LCOM* = (number of method pairs without shared attributes) / (total method pairs)

Where:

  • Method pairs are counted once (not twice)
  • Shared attributes means both methods access at least one common field

Returns a value between 0 and 1:

  • 0: perfect cohesion (all method pairs share attributes)
  • 1: no cohesion (no method pairs share attributes)

Implements

Constructors

Properties

Methods

Constructors

Properties

name: string = 'LCOM*'
description: string = 'Lack of Cohesion of Methods Star (Fernandez & Pena, 2006) - Ratio of non-sharing method pairs'

Methods