Which of the following represents the degree of mutual interdependence between modules components?

View Discussion

Improve Article

Save Article

Like Article

  • Read
  • Discuss
  • View Discussion

    Improve Article

    Save Article

    Like Article

    Introduction: The purpose of Design phase in the Software Development Life Cycle is to produce a solution to a problem given in the SRS(Software Requirement Specification) document. The output of the design phase is Software Design Document (SDD). 

    Basically, design is a two-part iterative process. First part is Conceptual Design that tells the customer what the system will do. Second is Technical Design that allows the system builders to understand the actual hardware and software needed to solve customer’s problem. 

    Which of the following represents the degree of mutual interdependence between modules components?

    Conceptual design of the system: 

    • Written in simple language i.e. customer understandable language.
    • Detailed explanation about system characteristics.
    • Describes the functionality of the system.
    • It is independent of implementation.
    • Linked with requirement document.

    Technical Design of the system: 

    • Hardware component and design.
    • Functionality and hierarchy of software components.
    • Software architecture
    • Network architecture
    • Data structure and flow of data.
    • I/O component of the system.
    • Shows interface.

    Modularization: Modularization is the process of dividing a software system into multiple independent modules where each module works independently. There are many advantages of Modularization in software engineering. Some of these are given below: 

    • Easy to understand the system.
    • System maintenance is easy.
    • A module can be used many times as their requirements. No need to write it again and again.

    Coupling: Coupling is the measure of the degree of interdependence between the modules. A good software will have low coupling. 
     

    Which of the following represents the degree of mutual interdependence between modules components?

    Types of Coupling: 

    • Data Coupling: If the dependency between the modules is based on the fact that they communicate by passing only data, then the modules are said to be data coupled. In data coupling, the components are independent of each other and communicate through data. Module communications don’t contain tramp data. Example-customer billing system.
    • Stamp Coupling In stamp coupling, the complete data structure is passed from one module to another module. Therefore, it involves tramp data. It may be necessary due to efficiency factors- this choice was made by the insightful designer, not a lazy programmer.
    • Control Coupling: If the modules communicate by passing control information, then they are said to be control coupled. It can be bad if parameters indicate completely different behavior and good if parameters allow factoring and reuse of functionality. Example- sort function that takes comparison function as an argument.
    • External Coupling: In external coupling, the modules depend on other modules, external to the software being developed or to a particular type of hardware. Ex- protocol, external file, device format, etc.
    • Common Coupling: The modules have shared data such as global data structures. The changes in global data mean tracing back to all modules which access that data to evaluate the effect of the change. So it has got disadvantages like difficulty in reusing modules, reduced ability to control data accesses, and reduced maintainability.
    • Content Coupling: In a content coupling, one module can modify the data of another module, or control flow is passed from one module to the other module. This is the worst form of coupling and should be avoided.

    Cohesion: Cohesion is a measure of the degree to which the elements of the module are functionally related. It is the degree to which all elements directed towards performing a single task are contained in the component. Basically, cohesion is the internal glue that keeps the module together. A good software design will have high cohesion. 

    Which of the following represents the degree of mutual interdependence between modules components?

    Types of Cohesion: 

    • Functional Cohesion: Every essential element for a single computation is contained in the component. A functional cohesion performs the task and functions. It is an ideal situation.
    • Sequential Cohesion: An element outputs some data that becomes the input for other element, i.e., data flow between the parts. It occurs naturally in functional programming languages.
    • Communicational Cohesion: Two elements operate on the same input data or contribute towards the same output data. Example- update record in the database and send it to the printer.
    • Procedural Cohesion: Elements of procedural cohesion ensure the order of execution. Actions are still weakly connected and unlikely to be reusable. Ex- calculate student GPA, print student record, calculate cumulative GPA, print cumulative GPA.
    • Temporal Cohesion: The elements are related by their timing involved. A module connected with temporal cohesion all the tasks must be executed in the same time span. This cohesion contains the code for initializing all the parts of the system. Lots of different activities occur, all at unit time.
    • Logical Cohesion: The elements are logically related and not functionally. Ex- A component reads inputs from tape, disk, and network. All the code for these functions is in the same component. Operations are related, but the functions are significantly different.
    • Coincidental Cohesion: The elements are not related(unrelated). The elements have no conceptual relationship other than location in source code. It is accidental and the worst form of cohesion. Ex- print next line and reverse the characters of a string in a single component.

    Software Engineering Multiple Choice Questions on “Software Design”.

    1. Which is the first step in the software development life cycle ? a) Analysis b) Design c) Problem/Opportunity Identification

    d) Development and Documentation

    This set of Software Engineering Multiple Choice Questions & Answers (MCQs) focuses on “Modularity in Software Design”.

    1. Java packages and Fortran subroutine are examples of__________ a) Functions b) Modules c) Classes d) Sub procedures

    View Answer

    Answer: b
    Explanation: A modular system consist of well defined manageable units with well defined interfaces among the units.

    2. Which of the property of software modularity is incorrect with respect to benefits software modularity? a) Modules are robust b) Module can use other modules c) Modules Can be separately compiled and stored in a library d) Modules are mostly dependent

    View Answer

    Answer: d
    Explanation: Modularity cannot bring benefits unless the modules are autonomous or independent.

    3. _______________ is a measure of the degree of interdependence between modules. a) Cohesion b) Coupling c) None of the mentioned d) All of the mentioned

    View Answer

    Answer: b
    Explanation: Coupling or dependency is the degree to which each program module relies on each one of the other modules.

    4. Which of the following is the best type of module coupling? a) Control Coupling b) Stamp Coupling c) Data Coupling d) Content Coupling

    View Answer

    Answer: c
    Explanation: The dependency between module A and B is said to be data coupled if their dependency is based on the fact they communicate by only passing of data.

    5. Which of the following is the worst type of module coupling? a) Control Coupling b) Stamp Coupling c) External Coupling d) Content Coupling

    View Answer

    Answer: c
    Explanation: Content coupling occurs when module A changes data of module B or when control is passed from one module to the middle of another.

    Become Top Ranker in Software Engineering Now!

    6. Which of the following is the worst type of module cohesion? a) Logical Cohesion b) Temporal Cohesion c) Functional Cohesion d) Coincidental Cohesion

    View Answer

    Answer: d
    Explanation: Coincidental cohesion exists in modules that contain instructions that have little or no relationship to one another.

    7. Which of the following is the best type of module cohesion? a) Functional Cohesion b) Temporal Cohesion c) Functional Cohesion d) Sequential Cohesion

    View Answer

    Answer: a
    Explanation: Functional Cohesion is a type of cohesion in which the tasks performed by a software module all contribute to the performance of a single function.

    8. A software engineer must design the modules with the goal of high cohesion and low coupling. a) True b) False

    View Answer

    Answer: a
    Explanation: If the software is not properly modularized, a host of seemingly trivial enhancement or changes will result into death of the project.

    9. In what type of coupling, the complete data structure is passed from one module to another? a) Control Coupling b) Stamp Coupling c) External Coupling d) Content Coupling

    View Answer

    Answer: b
    Explanation: None.

    10. If all tasks must be executed in the same time-span, what type of cohesion is being exhibited? a) Functional Cohesion b) Temporal Cohesion c) Functional Cohesion d) Sequential Cohesion

    View Answer

    Answer: b
    Explanation: A Module exhibits temporal cohesion when it contains tasks that are related by the fact that all tasks must be executed in the same time-span.

    Sanfoundry Global Education & Learning Series – Software Engineering.

    Here’s the list of Best Books in Software Engineering.

    • Get Free Certificate of Merit in Software Engineering
    • Participate in Software Engineering Certification Contest
    • Become a Top Ranker in Software Engineering
    • Take Software Engineering Tests
    • Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
    • Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

    Which of the following represents the degree of mutual interdependence between modules components?

    Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

    Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses.