Created
March 18, 2014 10:46
-
-
Save cleuton/9617726 to your computer and use it in GitHub Desktop.
LCOM4 Bad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LCOM4 bad sample:
a() - b() - x
c() - y - d() - e()
So, LCOM4 = 2.