SE310 FINAL EXAMS ACTUAL QUESTIONS AND
ANSWERS SURE A+
✔✔High Cohesion - ✔✔A module has well-defined responsibilities.
Good programming design.
✔✔Coupling - ✔✔The degree of interdependence between software modules.
How closely connected two routines or modules are.
The extent to which a class knows about the other class.
✔✔Tight Coupling - ✔✔two modules or routines are closely connected.
A class knows a lot about another class.
A bad programming design
✔✔Loose Coupling - ✔✔two routines or modules are Loosely connected.
A class knows very little about the other class.
a good programming design
✔✔Patterns: Template - ✔✔Define the skeleton of an algorithm in an operation,
deferring some steps to subclasses. Lets subclasses redefine certain steps of an
algorithm without changing the structure of the algorithm.
, ✔✔Patterns: Command - ✔✔Encapsulate a request as an object, thereby letting you
parameterize clients with different requests, queue or log requests, and support
undoable operations.
✔✔Patterns: Singleton - ✔✔Ensure a class only has one instance and provide a global
point of access to it.
✔✔Patterns: Observer - ✔✔Define a one-to-many dependency between objects so that
when one object changes state, all its dependents are notified and updated
automatically.
A one to many relationship.
✔✔Patterns: Decorator - ✔✔Attach additional responsibilities to an object dynamically.
Provide a flexible alternative to sub-classing for extending functionality.
✔✔Patterns: Factory - ✔✔Define an interface for creating an object, but let subclasses
decide which class to instantiate, lets a class defer instantiation to subclasses.
Look for parallel sets of classes that have "uses" relationships between one set of
classes and the other.
✔✔Patterns: Abstract Factory - ✔✔It provides an interface for creating families of
related or dependent objects without specifying their concrete class.
We will see the logic for choosing which factory to use pulled out of the base/abstract
factory into an external class.
✔✔Patterns: Bridge - ✔✔Decouple an abstraction from its implementation so that the
two can vary independently.
✔✔Patterns: Strategy - ✔✔Define a family of algorithms, encapsulate each one, and
make them interchangeable. Lets the algorithm vary independently from clients that use
it.
✔✔Patterns: Adapter - ✔✔Convert the interface of a class into another interface clients
expect. Lets classes work together that couldn't otherwise because of incompatible
interfaces.
✔✔Patterns: Facade - ✔✔Provide a unified interface to a set of interfaces in a
subsystem. Defines a high-level interface that makes the subsystem easier to use.
✔✔ Patterns: Iterator - ✔✔Provide a way to access the elements of an aggregate object
sequentially without exposing its underlying representation.
✔✔Patterns: Builder - ✔✔Separate the construction of a complex object from its
representing so that the same construction process can create different representations.
ANSWERS SURE A+
✔✔High Cohesion - ✔✔A module has well-defined responsibilities.
Good programming design.
✔✔Coupling - ✔✔The degree of interdependence between software modules.
How closely connected two routines or modules are.
The extent to which a class knows about the other class.
✔✔Tight Coupling - ✔✔two modules or routines are closely connected.
A class knows a lot about another class.
A bad programming design
✔✔Loose Coupling - ✔✔two routines or modules are Loosely connected.
A class knows very little about the other class.
a good programming design
✔✔Patterns: Template - ✔✔Define the skeleton of an algorithm in an operation,
deferring some steps to subclasses. Lets subclasses redefine certain steps of an
algorithm without changing the structure of the algorithm.
, ✔✔Patterns: Command - ✔✔Encapsulate a request as an object, thereby letting you
parameterize clients with different requests, queue or log requests, and support
undoable operations.
✔✔Patterns: Singleton - ✔✔Ensure a class only has one instance and provide a global
point of access to it.
✔✔Patterns: Observer - ✔✔Define a one-to-many dependency between objects so that
when one object changes state, all its dependents are notified and updated
automatically.
A one to many relationship.
✔✔Patterns: Decorator - ✔✔Attach additional responsibilities to an object dynamically.
Provide a flexible alternative to sub-classing for extending functionality.
✔✔Patterns: Factory - ✔✔Define an interface for creating an object, but let subclasses
decide which class to instantiate, lets a class defer instantiation to subclasses.
Look for parallel sets of classes that have "uses" relationships between one set of
classes and the other.
✔✔Patterns: Abstract Factory - ✔✔It provides an interface for creating families of
related or dependent objects without specifying their concrete class.
We will see the logic for choosing which factory to use pulled out of the base/abstract
factory into an external class.
✔✔Patterns: Bridge - ✔✔Decouple an abstraction from its implementation so that the
two can vary independently.
✔✔Patterns: Strategy - ✔✔Define a family of algorithms, encapsulate each one, and
make them interchangeable. Lets the algorithm vary independently from clients that use
it.
✔✔Patterns: Adapter - ✔✔Convert the interface of a class into another interface clients
expect. Lets classes work together that couldn't otherwise because of incompatible
interfaces.
✔✔Patterns: Facade - ✔✔Provide a unified interface to a set of interfaces in a
subsystem. Defines a high-level interface that makes the subsystem easier to use.
✔✔ Patterns: Iterator - ✔✔Provide a way to access the elements of an aggregate object
sequentially without exposing its underlying representation.
✔✔Patterns: Builder - ✔✔Separate the construction of a complex object from its
representing so that the same construction process can create different representations.