Software Engineering Cohesion and Coupling
45 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which type of cohesion occurs when a module’s tasks must be executed in the same time-span?

  • Logical Cohesion
  • Functional Cohesion
  • Temporal Cohesion (correct)
  • Procedural Cohesion
  • In logical cohesion, all elements of the module perform different operations.

    False

    What is an example of procedural cohesion?

    An algorithm for decoding a message that requires tasks to be completed in a specific order.

    Modules whose instructions are related by a specific sequence are said to exhibit __________ cohesion.

    <p>procedural</p> Signup and view all the answers

    Match the following types of cohesion with their definitions:

    <p>Functional Cohesion = Tasks are part of a single functional task. Sequential Cohesion = Output from one module serves as input to another. Communicational Cohesion = Code is organized based on the shared data. Temporal Cohesion = Tasks that must be executed in the same time-span.</p> Signup and view all the answers

    Which type of cohesion keeps all code that uses the same data together?

    <p>Communicational Cohesion</p> Signup and view all the answers

    In sequential cohesion, all tasks within the module perform the same function.

    <p>False</p> Signup and view all the answers

    What illustrates high cohesion in a programming module?

    <p>A module where all components contribute to a single, well-defined task.</p> Signup and view all the answers

    What type of coupling exists when two modules communicate solely through the passing of data?

    <p>Data coupling</p> Signup and view all the answers

    Control coupling occurs when modules communicate by passing complete data structures.

    <p>False</p> Signup and view all the answers

    What is content coupling?

    <p>Content coupling occurs when module A changes the data of module B or control is passed into the middle of another module.</p> Signup and view all the answers

    ______ coupling occurs when two modules have access to shared global data areas.

    <p>Common</p> Signup and view all the answers

    Match the following types of coupling with their descriptions:

    <p>Data coupling = Modules communicate by passing only data Control coupling = Modules communicate through control information Common coupling = Modules share a global data area Content coupling = One module controls or changes the data of another module</p> Signup and view all the answers

    What is an example of control coupling?

    <p>Setting a flag to control the flow of execution in a module</p> Signup and view all the answers

    In stamp coupling, only part of a data structure is passed between modules.

    <p>True</p> Signup and view all the answers

    Define external coupling.

    <p>External coupling occurs when two modules share an externally imposed data format or communication protocol.</p> Signup and view all the answers

    Which of the following best describes composition in object-oriented design?

    <p>Indicates a permanent part relationship where A contains B</p> Signup and view all the answers

    An actor within a sequence diagram represents a specific physical entity that interacts with the subject.

    <p>False</p> Signup and view all the answers

    What is the primary purpose of a sequence diagram?

    <p>To capture how objects interact with each other over time.</p> Signup and view all the answers

    A lifeline in a sequence diagram represents an individual ______ in the interaction.

    <p>participant</p> Signup and view all the answers

    Match the following terms with their definitions:

    <p>Aggregation = A relationship where A is part of B Dependency = A situation where A relies on B Subclass = A specialization of a superclass Association = A collaboration where A needs assistance from B</p> Signup and view all the answers

    How many interaction diagrams should typically be drawn for each use case?

    <p>One sequence diagram</p> Signup and view all the answers

    An activation in a sequence diagram is represented by a thick rectangle.

    <p>False</p> Signup and view all the answers

    In object-oriented programming, what does a subclass represent?

    <p>A kind of superclass or a specialization of it.</p> Signup and view all the answers

    What does a call message represent in an interaction?

    <p>Invocation of operation of target lifeline</p> Signup and view all the answers

    A destroy message represents the instantiation of a target lifeline.

    <p>False</p> Signup and view all the answers

    What does a duration message show in an interaction?

    <p>The distance between two time instants for a message invocation.</p> Signup and view all the answers

    A _____ message represents the invocation of a message of the same lifeline.

    <p>self</p> Signup and view all the answers

    Which type of message indicates a request to destroy the lifecycle of a target lifeline?

    <p>Destroy Message</p> Signup and view all the answers

    Match the following types of messages with their definitions:

    <p>Call Message = Defines communication invoking operation in target lifeline Return Message = Passes information back to the caller Create Message = Instantiates a target lifeline Recursive Message = Invokes a message from the same lifeline</p> Signup and view all the answers

    An iteration marker is used to indicate that a message is sent many times.

    <p>True</p> Signup and view all the answers

    What is an optional feature of return values in an interaction?

    <p>Indicated using a dashed arrow with a label.</p> Signup and view all the answers

    In a 1:N relationship, what is added to the relation on the many side?

    <p>Primary key attribute from the one side as a Foreign key</p> Signup and view all the answers

    In a binary 1:N relationship, the many side does not migrate any keys from the one side.

    <p>False</p> Signup and view all the answers

    What is the purpose of creating another relation in an M:N relationship?

    <p>To include primary keys of all relations as the primary key of the new relation.</p> Signup and view all the answers

    In the ORDER table after the relationship, the added attribute is the ______.

    <p>Customer_ID</p> Signup and view all the answers

    Match the following tables with their respective attributes:

    <p>ORDER = Order_Number, Order_Date, Promised_Date, Customer_ID Manages = ssn, did, since Employees = Employee_ID, Employee_Name Departments = Department_ID, Department_Name</p> Signup and view all the answers

    What is a sequence fragment in UML 2.0?

    <p>A box that encloses a portion of interactions in a sequence diagram</p> Signup and view all the answers

    The fragment operator is located in the bottom right corner of a combined fragment.

    <p>False</p> Signup and view all the answers

    Name one type of fragment used in UML sequence diagrams.

    <p>opt</p> Signup and view all the answers

    An attribute is a property of an entity that is of interest to an ______.

    <p>organization</p> Signup and view all the answers

    Which of the following is NOT a fragment type in UML?

    <p>data</p> Signup and view all the answers

    What are the three main constructs used in Entity-Relationship Diagrams?

    <p>Entity, Attribute, Relationship</p> Signup and view all the answers

    Match the following entity types with their examples:

    <p>Employee = An individual working in a company Student = A learner enrolled in educational programs Car = A vehicle for transport Bank Account = A financial account held by an individual or organization</p> Signup and view all the answers

    A candidate key is an attribute that can uniquely identify an entity type.

    <p>True</p> Signup and view all the answers

    Study Notes

    Software Design

    • Software design involves transforming the system requirements specification (SRS) document into a design document.
    • The design process has two parts: conceptual design and technical design.
    • Developers and customers collaboratively work on the design.
    • Conceptual design focuses on understanding data sources, system operation, user interface, and user choices.
    • Technical design details hardware, software, communication interfaces, and solutions.
    • The design process is iterative; it involves refining designs in several versions.
    • Design starts with informal outlining and refines into more formal completed designs.

    Conceptual Design

    • Conceptual design answers where data originates, how it's handled within the system, how the system appears to users, the available user choices, event timing, and output format of reports and screens.

    Technical Design

    • This includes hardware specifications, the needed software, communication interfaces, and system solutions for the customer's requirements.
    • Software architecture, network architecture, and other components are described.

    Overview of the Design Process

    • The general design process model includes requirement specifications, architectural design, abstract specification, interface design, component design, data structure design, and algorithm design.

    Design Products

    • Architectural design identifies subsystems and defines sub-system control and communication frameworks.
    • Output is an architectural design document.
    • Abstract specification details services and constraints for each subsystem.
    • Interface design documents an interface for each subsystem.
    • Component design details allocated services and components' interfaces.
    • Data structure design involves detailing used system data types.
    • Algorithm design involves specifying algorithms for handling system processes.

    Good Software Design

    • A good design is easy to understand, maintain, and modify.
    • Using consistent and significant names in components and modules enhances readability.
    • Modularity, breaking down the solution into modules, promotes independent functionality and reduces interconnectedness.

    Modularity

    • Modularization divides a system into distinct modules, each performing specific tasks independently.
    • Independent modules improve understanding, reducing complexity..

    Cohesion and Coupling

    • Cohesion describes the strength of a module’s functionality.
    • Coupling measures the interdependence between modules.
    • High cohesion enhances modularity and reduces complexity.
    • Low coupling indicates minimal dependence and easier modifications.

    Classification of Cohesion

    • Types of cohesion include coincidental, logical, temporal, procedural, communicational, sequential, and functional.

    Classification of Coupling

    • Types include data coupling, stamp coupling, control coupling, external coupling, common coupling, and content coupling.
    • Data coupling is the best form and content coupling is the worst form.

    Data Dictionary

    • All data items used in DFDs are listed and described in the data dictionary, including their definitions, purpose, and usage.

    Data Flow Diagram (DFD)

    • DFDs are graphical representations of data flows in a system, often used in information systems.
    • Symbols represent data flows between entities and processes.

    Level 0 Data Flow Diagram

    • A high-level overview of the system, representing the entire system as a single process with its relationship to external entities.
    • Inputs and outputs are identified as data flows.
    • A top-level overview of the system and how external components interact.

    Level 1 Data Flow Diagram

    • Decomposition of a level 0 data flow diagram into smaller, more specific processes (bubbles) which illustrate sub processes, often focusing on the inputs, outputs, and data stores involved in each process.

    Object-Oriented Design (OOD)

    • OOD treats the system as a collection of objects with their own data and methods, handling data within each object, with objects communicating through message passing.

    Unified Modeling Language (UML)

    • UML provides a standard graphical language for modeling systems from various viewpoints.
    • UML diagrams depict system structure and behavior.
    • UML is not a system design but is a modeling language.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Software Design PDF

    Description

    Test your knowledge on cohesion and coupling in software engineering. This quiz covers various types of cohesion and coupling, their definitions, and examples. See how well you understand these important concepts in programming.

    More Like This

    Cohesión y Componentes en Software
    21 questions
    Software Design UNIT-I Quiz
    5 questions
    Use Quizgecko on...
    Browser
    Browser