CSE Roadmap

Core tier · about 3 hours · 6 parts

Part 1 of 6 · 1 min read

Why this page comes sixth

In this module you will

  • Define coupling and cohesion and say which one should be low and which high.
  • Judge a class for cohesion by looking at which methods use which fields.
  • Name forms of cohesion from strong to weak.
  • Apply the Law of Demeter ("talk to friends") and fix a long call chain.
  • Explain why the principles of modules 1 to 5 all reduce coupling or raise cohesion.

Modules 1 to 5 gave named rules. This page gives the two measures behind them. When a rule does not fit a case, these measures still do. The sources are "Clean Code" (CC), chapter 10 and chapter 6, "Head First Design Patterns" (HF), chapter 7, and "Fundamentals of Software Architecture" (FSA), chapter 3. Code was compiled and run before it was written here. Numbers marked "made up" only show the idea.