OO Best Practice

From Suhrid.net Wiki
Revision as of 21:17, 21 August 2011 by Suhridk (talk | contribs)
Jump to navigationJump to search

Intro

  • Exam focuses on recognizing tight encapsulation, loose coupling and high cohesion.

Coupling

  • Coupling is the degree to which one class knows about the other class.
  • Ideally a class should know about another class only through what has been exposed through its interface/API.
  • If two classes know internal details about each other - they are said to be tightly coupled. This would mean that they cannot be modified independently.