Why abstraction is an advantage
What properties should modules have?
What is coincidental cohesion?
A function that performs unrelated operations
What is logical cohesion?
Performs one of several operations based upon a control flag parameter. Does 1 or 5 different things based on a control parameter.
What is procedural cohesion?
performs operations in a specific order, but the operations do not share any data
What is temporal cohesion?
performs several operations which are related only because they must be performed at the same time.
fix: have them call seperate functions that do each operation
What is communicational cohesion?
performs operations on the same data but are not otherwise related.
considered acceptable if necessary
What is Sequential cohesion
function with operations that must be performed in a specific order, with the output of one operation being the input of the next.
Example:
What is functional cohesion
idea case
performs only one operation
What is Module Cohesion?
List the function couplings
Bad
Acceptable