Skip to content

Instantly share code, notes, and snippets.

@cleuton
Created March 18, 2014 10:32
Show Gist options
  • Save cleuton/9617519 to your computer and use it in GitHub Desktop.
Save cleuton/9617519 to your computer and use it in GitHub Desktop.
LCOM4 = 1 sample
public class One {
int x;
int y;
void a() {
b();
}
int b() {
return this.x;
}
int c() {
return this.x + this.y;
}
int d() {
return e(this.y);
}
int e(int number) {
return number * 2;
}
}
@cleuton
Copy link
Author

cleuton commented Mar 18, 2014

This class have LCOM4 = 1, because the following members are linked:

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

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