Human can only deal with a limited amount of complexity at a particular time – Design with hierarchies – Object-Oriented design 5/13/2019 CS132: Software Engineering 7
Information Hiding • Hiding complexity – You don’t need to deal with them at more abstract levels • Hiding sources of change – Limit the effects of change within a scope • Example: int id; id++; – id=NewID(); • Hide implementation details • Hide potential changes to range and pattern of id – TypeID id; id=NewID(); • Hide potential changes to the type of id 5/13/2019 CS132: Software Engineering 8
Loose Coupling • Small, direct, visible and flexible relationships between modules (classes and routines) • Easily reusable • Low dependencies between modules 5/13/2019 CS132: Software Engineering 9
Coupling Criteria • Size – Number of connections between modules • Public methods of a class • Input variables of a routine • Visibility – Input variables of a routine are obvious, which is good.
You've reached the end of your free preview.
Want to read all 12 pages?
- Spring '19
- Zhihao Jiang