chapter 6 Flashcards
What is design methodology?
logical and systematic steps to progress the design process.
also a set of guidelines for decision making.
What is refactoring (design methodology)?
Design decisions are revisited and revised.
What are design principles? Name the 6 principles.
Characteristics of good design.
Guidelines for decomposing a system.
- Modularity
- Interfaces
- Information hiding (public, protected, private)
- Incremental development
- Abstraction
- Generality
What is modularity in design principles?
A well organized system. Unrelated aspects are kept separate.
Each component has a single purpose.
Use coupling and cohesion to accomplish modularity.
What is coupling in design principles?
Degree by which software components are dependent on each other. Low coupling is better.
Tightly coupled: depend greatly on each other.
Loosely coupled: some dependencies.
Uncoupled: no dependencies.
What is content coupling?
Tightly coupled. A module that modifies the internal elements of another module. (internal access not public or protected methods).
What is common coupling?
Data is duplicated and kept in different modules. A change to the data needs to be changed in all duplicated locations.
What is control coupling?
When a module passes parameters or return code to control another module.
What is data coupling?
Data coupling is where modules are connected by unstructured data.
What is stamp coupling?
When two modules are connected by structured data (JSON format, csv, etc).
What is cohesion? What are the 7 types of cohesion?
Degree to which the elements inside a module belong together. High cohesion is better (think MVC).
- coincidental
- logical
- temporal
- procedural
- communicational
- functional
- informational
What is coincidental cohesion?
A module containing unrelated elements; low cohesion.
What is logical cohesion?
Parts are related only by the logic structure not functionally; low cohesion.
What is temporal cohesion?
Elements of a component are related by timing.
What is procedural cohesion?
Ensures the order of the execution; algorithms.
What is communication cohesion?
Multiple modules operates on the same data set (input or output). Place each dataset in its own module.
What is functional cohesion?
All elements essential to a function are contained in one module, and all of the elements are essential to the performance of the function.
The ideal solution.
What is informational cohesion?
Adaptation of functional cohesion to data-abstraction and object-based design.
Parts of a module are grouped together as they are suppose to operate on the same data or information.
What is an interface (design principle)?
defines the services of a system,
defines how units access the services; public methods.
A module can have several interfaces.
What is the specification of a software unit’s interface?
A description of the externally visible properties of a software system.
- purpose: description of the function.
- preconditions: requirements of the function (variables, libraries, etc.).
- protocols: sequence of function calls.
- postconditions: return values, exceptions, modified variables.
- quality attributes: no description given…
What is information hiding?
Public, private, protected; only necessary information is shown. Good use of information hiding allows units to be loosely coupled.
What is incremental development?
Software is developed in phases.
Dependencies are used to design a development schedule for scrum.
What do “uses graphs” help a system do?
Helps to identify progressively larger subsets of our system that can be implemented and tested incrementally.
Fan-in: number of higher level modules that call this module. Fan-out: number of lower level modules that this module uses.