70 likes | 85 Views
Software Modules in Software Design. What is a Module?. “A set of one or more contiguous program statements having a name by which other parts of the system can invoke it, and preferably having its own distinct set of variable names.” [Stevens, Myers…74].
E N D
What is a Module? “A set of one or more contiguous program statements having a name by which other parts of the system can invoke it, and preferably having its own distinct set of variable names.” [Stevens, Myers…74]
“A module is a lexically contiguous sequence of program statements, bounded by boundary elements, having an aggregate identifier.” [Yourdon, Constantine 79]
Avantages • Decomposition into easily dealt with pieces • can abstract call by descriptive naming • break up program into system “architecture” • reduce complexity that one inspector needs to view when considering a design concept • debug by following trail of destruction through interfaces to independent module for repair • what properties does a module need to accomplish all this?
Conservation of Complexity • Move complexity of singular program module to interfaces between less complex modules • hierarchy and decomposition, “divide and conquer” • Net complexity is conserved, but it is divided so as to give programmers some leverage?
Cohesion and Coupling(a “system” concept!) • Cohesion • the degree of interaction within a module • Coupling • the degree of interaction between modules
Module Cohesion • Informational • Functional