CIS 375 SOFTWARE ENGINEERING

University Of Michigan-Dearborn

Dr. Bruce Maxim, Instructor

Coupling:

Definition: degree of inter-module dependence.

Factors:

    1. Type of connection between modules.
    2. Complexity of the interface.
    3. Type of information flow.
    4. Binding time with the connection.

Types Of Coupling:

(Low is good)

    1. No direct coupling.
    2. Data coupled (data structures).
    3. Stamped coupling (parts of data structure).
    4. Central coupling (flags, etc.).
    5. External coupling (file format, database).
    6. Common coupling.
    7. Contact coupling.

Decouple:

    1. Early in design.
    2. Convert implicit references.
    3. Standardize connections.
    4. Localize your variables.
    5. Use buffers to moderate I/O to modules.

(Avoid race conditions, no waiting)

Cohesion:

(High is good)

  1. Coincidental cohesion.
  2. Logical cohesion.
  3. Temporal cohesion.
  4. Procedural cohesion.
  5. Communicational cohesion.
  6. Sequential cohesion.
  7. Functional cohesion.

Techniques to ­ Cohesion And ¯ Coupling:

    1. Small modules.
    2. Control "fan out" (degree to which tree is wide).
    3. Focus on "fan in" (fan in = reuse).
    4. Scope of effect should be a subset of scope of control.
    5. (Don’t make a major decision in the lower modules)

    6. Depth.

Design Heuristics:

  1. Evaluate "first cut" and reduce coupling and increase cohesion.
  2. Minimize "fan out" and focus on "fan in".
  3. Scope of effect should be subset of scope of control.
  4. Reduce complexity of interfaces and improve consistency.
  5. Define modules with predictable behavior, don’t be overly restrictive.
  6. Strive for single entry, single exit modules.
  7. Package software based on design constraints and portability requirements (package = how the modules go together).

Data Design:

    1. Systematic analysis applied to functional behavior, can be applied to data.
    2. Data structures and operations should be identified.
    3. Establish a data dictionary and use it to guide both data and program design.
    4. Defer low level data structure decisions until late in the design.
    5. Information hiding.
    6. Libraries of useful data structures and operators is developed.
    7. Environment must support ADT’s.

Architectural Design:

Procedural Design:

    1. Structured programming theorem.
    2. Flow charts.

    3. Box diagrams.



Procedural Design: (cont.)


S1

Case V of

Case 1: while C1 do

S2

S3

Case 2: S4

S5

Case 3: if C2 then

Repeat

S6

S7

Until C3

Else

S8

S9

    1. Decision tables.
    2. PDL (program design language)
    1. Fixed syntax for keywords, control structures, data declarations, module declarations.
    2. "Free" natural language syntax.
    3. Data declarations for simple and structured types.
    4. Subprogram definition and call techniques for several interface types.
    1. Warnier diagrams
    2. Data flow diagrams

Perspective of the system as data transforms.