ソフトウェアの結合と結束に関するアイデアをいくつか書こうとしていますが、実用的な意味がないのか分かりません。ですから、例とあなたの答えを説明したい場合は、単純な代数的表現を使用してください代数は、私たちすべてが話しyou'reかを理解することができ、順次プログラミング言語であることを想像...¿私はカップリングの意味について正しいですか?
だからここ(¿これは正しいでしょうか?)私は信じたいものです。
'Implementation of A with Low Cohesion
'(Coincidental cohesion because there is no
' good reason or need to group the functions
' in this way)
a(x) = 2x + 1
b(x) = 3x + 2
r(x) = a(x) + b(x)
...
'Implementation of A with High Cohesion (Almost Atomic)
r(x) = 5x + 3
...
'Implementation of A with Low Cohesion too
a(x) = 2x + 1
r(x) = a(x) + 3x + 2
...
'Implementations of A with Functional Cohesion
a(x, y) = x * y 'Groups multiplication
b(x, y) = x + y 'Groups addition
r(x) = b(a(5,x), 3)