Cohesion metrics & coupling metrics are metrics in Component-level design

Q.  Cohesion metrics and coupling metrics are metrics in which level of design?
- Published on 22 Jul 15

a. User interface design
b. Pattern-based design
c. Architectural design
d. Component-level design

ANSWER: Component-level design


  • Nirja Shah   -Posted on 23 Oct 15
    Component-level design
    - It occurs after the first iteration of the architectural design

    - It strives to create a design model from the analysis and architectural models

    - The translation can open the door to subtle errors that are difficult to find and correct later

    - “Effective programmers should not waste their time debugging – they should not introduce bugs to start with.” Edsgar Dijkstra

    - This design can be represented using some intermediate representation (e.g. graphical, tabular, or text-based) that can be translated into source code

    - To avoid the introduction of errors the design of data structures, interfaces, and algorithms should conform to well-established guidelines.

    - Cohesion is the “single-mindedness’ of a component
    - It implies that a component or class encapsulates only attributes and operations that are closely related to one another and to the class or component itself
    - The objective is to keep cohesion as high as possible
    - The kinds of cohesion can be ranked in order from highest (best) to lowest (worst)
    - Functional
    A module performs one and only one computation and then returns a result
    - Layer
    A higher layer component accesses the services of a lower layer component
    - Communicational
    All operations that access the same data are defined within one class

    - As the amount of communication and collaboration increases between operations and classes, the complexity of the computer-based system also increases
    - As complexity rises, the difficulty of implementing, testing, and maintaining software also increases
    - Coupling is a qualitative measure of the degree to which operations and classes are connected to one another
    - The objective is to keep coupling as low as possible

Post your comment / Share knowledge

Enter the code shown above:
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)