Software Engineering Exam 2 Flashcards
Module
A lexically continguous sequence of program statements, bounded by elements and identified as an aggregate.
Cohesion
The degree of interaction within a module.
Coupling
The degree of interaction between modules.
Data Encapsulation
Integrating data and operations on the data within the same module helps isolate changes and improve maintainability.
Abstract Data Types
Types of data with associated operations but without public data attributes.
Information Hiding
Concealing details that might change within a module to ensure modularity.
Object-Oriented Paradigm
Emphasis on objects, inheritance, polymoprhism, and encapsulation to improve software structure and reusability.
Modules should be designed for?
High cohesion and low coupling .
Coincidental Cohesion
Performs unrelated tasks, leading to poor maintainability and reuse.
Logical Cohesion
Performs related tasks chosen by the caller, like all input/output functions grouped together.
Temporal Cohesion
Groups actions related by time. These actions are weakly related functionally.
Procedural Cohesion
Actions are related by the sequence in which they occur.
Communicational Cohesion
Actions use the same data set.
Functional Cohesion
The highest level, where each module performs exactly one taks.
Informational Cohesion
Actions operate on a shared data structure, each action independent with its entry point.
Which cohesion is ideal and why?
Functional cohesion. Highly reusable, easily maintainable, and easier to debug since it performs a single task.
Content Coupling
One module directly uses or modifies another’s content, leading to high interdependency.
Common Coupling
Multiple modules share access to global data, reducing readability and maintainability.
Control Coupling
Modules control each other’s flow by passing control information.
Stamp Coupling
Modules share complex data structures but only use parts of them, reducing reusability.
Data Coupling
Modules interact via simple data parameters, which is ideal as it minimizes dependencies.
Objects and Classes
An object is an instantiation of a class, which is an abstract data type that supports inheritance.
Inheritance
A mechanism where a subclass inherits properties and behaviors from a parent class, promoting code reuse.
Polymorphism
A key concept in OOP that allows objects of different classes to be treated as objects of a common superclass. It enables s single interface to represent different underlying forms (data types).
Dynamic Binding
Method calls are resolved at runtime, which can enhance flexibility but complicate maintenance.