Formula for Instability (I)?

Prepare for the Object-Oriented Programming Test with flashcards and multiple choice questions. Each question comes with hints and explanations to enhance understanding. Master OOP concepts and succeed in your exam!

Multiple Choice

Formula for Instability (I)?

Explanation:
Instability is about how many outward dependencies a module has relative to its total dependencies, reflecting how much changes in other parts of the system might ripple outward. We count fan-in (how many modules depend on this one) and fan-out (how many modules this one depends on). The formula uses fan-out in the numerator and the sum of fan-in and fan-out in the denominator: I = fan-out / (fan-in + fan-out). This creates a value between 0 and 1 that represents the proportion of dependencies that go outward. Why this form is best: instability grows when a module depends on many others (high fan-out) and shrinks when many others depend on it (high fan-in) or when it depends on few others (low fan-out). Using the ratio of outward dependencies to total dependencies captures that balance and normalizes it to a 0–1 scale. If nothing depends on a module (fan-in = 0) but it depends on others (fan-out > 0), I approaches 1 (highly unstable). If many rely on the module (high fan-in) but it depends on few others (low fan-out), I is near 0 (stable). The other formulas don’t reflect that proportion correctly. Putting fan-in in the numerator emphasizes how many depend on the module rather than how much the module drags others along, which reverses the interpretation. Taking a difference or using just the sum doesn’t bound the value to 0–1 or express the share of outward dependencies, so they don’t measure instability in the same meaningful, normalized way.

Instability is about how many outward dependencies a module has relative to its total dependencies, reflecting how much changes in other parts of the system might ripple outward. We count fan-in (how many modules depend on this one) and fan-out (how many modules this one depends on). The formula uses fan-out in the numerator and the sum of fan-in and fan-out in the denominator: I = fan-out / (fan-in + fan-out). This creates a value between 0 and 1 that represents the proportion of dependencies that go outward.

Why this form is best: instability grows when a module depends on many others (high fan-out) and shrinks when many others depend on it (high fan-in) or when it depends on few others (low fan-out). Using the ratio of outward dependencies to total dependencies captures that balance and normalizes it to a 0–1 scale. If nothing depends on a module (fan-in = 0) but it depends on others (fan-out > 0), I approaches 1 (highly unstable). If many rely on the module (high fan-in) but it depends on few others (low fan-out), I is near 0 (stable).

The other formulas don’t reflect that proportion correctly. Putting fan-in in the numerator emphasizes how many depend on the module rather than how much the module drags others along, which reverses the interpretation. Taking a difference or using just the sum doesn’t bound the value to 0–1 or express the share of outward dependencies, so they don’t measure instability in the same meaningful, normalized way.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy