Skip to content

Instantly share code, notes, and snippets.

@cleuton
Created Mar 18, 2014
Embed
What would you like to do?
LCOM4 Bad
public class One {
int x;
int y;
void a() {
b();
}
int b() {
return this.x;
}
int c() {
return this.y;
}
int d() {
return e(this.y);
}
int e(int number) {
return number * 2;
}
}
@cleuton
Copy link
Author

cleuton commented Mar 18, 2014

LCOM4 bad sample:

a() - b() - x
c() - y - d() - e()

So, LCOM4 = 2.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment