1 / 15

SOFTWARE DESIGN QUALITY

SOFTWARE DESIGN QUALITY. COHESION and COUPLING (Part I). Goals and Concepts of Structured Analysis and Design:. structured development of software: methodology notation (DFD, SC ) integration of analysis and design quality control (cohesion, coupling)

maine
Download Presentation

SOFTWARE DESIGN QUALITY

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SOFTWARE DESIGN QUALITY COHESION and COUPLING (Part I)

  2. Goals and Concepts of Structured Analysis and Design: • structured development of software: • methodology • notation (DFD, SC) • integration of analysis and design • quality control (cohesion, coupling) • based on the flow of information (data) • provides proven heuristics

  3. Quality Characteristics for Design • modular design achieved by • abstraction • decomposition/aggregation • specialisation/generalisation • stepwise refinement [N. Wirth] • information hiding [D.L. Parnas] ===> independent modules

  4. Quality Characteristics for Modules • independent modules • avoid aggregation of multiple functions per module • single-minded function ===> high COHESION • minimal interaction with other modules • simple interface ===> low COUPLING [Steven, Myers, Constantine]

  5. Module COHESION • quality of a single module • based on the module’s internal functionality • cohesion should be high • types of cohesion (low to high):

  6. Coincidental Cohesion • characteristics: • functions relate very loosely to each other • “random” selection of multiple functions • example(s): • result of post-facto “modularization” • result of poor maintenance • problems: • multiple functions • no logical connection between functions

  7. Logical Cohesion • characteristics: • combines similar functions • implements a set of functions for “all purposes” • example(s): • pack/unpack records for telecommunication • central error-handling module • problems: • multiple functions • wide interface (with control parameters) • bad reusability, maintainability

  8. Temporal / Classical Cohesion • characteristics: • combines similarfunctions and all of them are always executed at the same time • example(s): • open-all-files module • initialise-all-variables • problems: • multiple functions • bad reusability, maintainability • violation of the principle of “local scope”

  9. Procedural Cohesion • characteristics: • tasks must be executed in a specific sequence and are related by the flow of control • example(s): • combine decision making & task execution, e.g. error-detection and error handling • local optimisation • problems: • fixed combination and order of tasks • bad reusability, maintainability

  10. Communicational Cohesion • characteristics: • tasks that use the same data (parameters) • sharing (portions) of a data structure • example(s): • monthly-employee-statistic and write-paycheque, both functions using the employee-record • problems: • wide interface (with stamp data coupling) • code sharing is tempting • bad reusability, maintainability

  11. Communicational Cohesion R1 D’ task A D R2 task B D” Module X

  12. Sequential Cohesion • characteristics: • tasks execute in a specific sequence and are related by the flow of data • tasks transform data in a multitude of steps • example(s): • calculate-taxes and write-paycheque • problems: • hidden interface(s) • fixed combination and order of tasks • bad reusability, maintainability

  13. Sequential Cohesion D’ D R task A task B Module X

  14. Functional Cohesion • characteristics: • single-minded function • cannot be decomposed any further (in a meaningful way) • not based on control or data flow • algorithmic behaviour / description • simple interface = good parameters (no stamp coupling, no control) • problems: • cannot always be achieved

  15. End of Section 4a coming up: coupling

More Related