Recall that class B is a provider of class A if A references B:
Providers(A) = { B | A references B }
We can also study the transitive closure of this set:
Providers*(A) = { B | A depends on B }
The size of this set is called the encumbrance of A:
encumbance(A) = #Providers*(A)
If A is to be reused in another program, then its encumbrance tells us how many other classes will need to be added to the program to make A work.
Compute encumbrance(A) where:
providers(A) = {B, C}
providers*(A) = {A, B, C, D, E}
encumbrance(A) = #providers*(A) = 5