Final Review Flashcards

1
Q

What is open Architecture?

A

A layered architecture in which a layer may make use of services in any layer below it (as opposed to only the layer designed to make adding, upgrading and swapping components easy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What are the changes that are valid after the program gets executed?

A

Post conditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Specification Inheritance:

A
The combination of  inheritance and specification
 The super class is an abstract class
 Implementations of the super class (if there are any) are not inherited
 The Interface of the super class is completely inherited
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

represent the interactions between the actors and the system.

A

Boundary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe Observer Pattern

A

• Models a 1-to-many dependency between objects

o Connects the state of an observed object, the subject with many observing objects, the observers
• Usage:
o Maintaining consistency across redundant states

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Builder Pattern

A
  • The construction of a complex object is common across several representations
  • Example
  • Converting a document to a number of different formats
  • the steps for writing out a document are the same
  • the specifics of each step depend on the format
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Interface:

A
An abstract class which has only abstract methods
 An interface is primarily used for the specification of a system or subsystem. The implementation is provided by a subclass or by other mechanisms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

represent the persistent information tracked by the system

A

Entitites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What remains true while the code is executing.

A

Invariance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

It essentially states that, if a client code uses the methods provided by a superclass, then developers should be able to add new subclasses without having to change the client code. Formal definition for specification inheritance.

A

Liskov Substitution Principle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe an adapter

A

An adapter is geared towards making unrelaed components work together. They are applied to systems after they are re disigned. Inheritacne followed by delegation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Proxy Pattern

A

The Proxy object is a local representatioe for an object in a different address space.

  1. Remote Proxy (good if information desen’t need to be changed to often).
  2. Standin (Virtual Proxy) - good if objects don’t need to be accessed to often.
  3. Access Control - Permission (ex. grades accessed by techers, student, staff)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Strategy Pattern

A

• Different algorithms exists for a specific task, • We can switch between the algorithms at run time

  • Examples of tasks:
  • Different collision strategies for objects in video games
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Frameworks

A

A framework is a reusable partial application that can be specialized to produce custom applications.
The key benefits of frameworks are reusability and extensibility:
Reusability leverages of the application domain knowledge and prior effort of experienced developers
Extensibility is provided by hook methods, which are overwritten by the application to extend the framework.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A subsystem that provides a service to another subsystem.

A

Layers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Facade Pattern

A

A Facade Pattern provides a unified interface for a set of objects in a subsystem,

10
Q

Abstract method:

A

A method with a signature but without an implementation (also called abstract operation)

12
Q

Closed Architecture

A

A layered system in which a layer can depend only on layers immediately below it. Contrast with open architecture.

13
Q

Black-box frameworks

A

Extensibility achieved by defining interfaces for components that can be plugged into the framework.
Existing functionality is reused by defining components that conform to a particular interface
These components are integrated with the framework via delegation.

14
Q

White-box frameworks:

A

Requires the framework user to understand the internals of the framework to use it effectively.
Existing functionality is extended by subclassing framework base classes and overriding specific methods (so-called hook methods)

15
Q

what has to be valid before the algorithm gets executed

A

Precondition

16
Q

What is a layer

A

• A layer is a subsystem that provides a service to another subsystem with the following restrictions: o A layer only depends on services from lower layers o A layer has no knowledge of higher layers

17
Q

Draw and adapter Pattern

A
19
Q

• specifies constraints that the class user must meet before using the class as well as constraints that are ensured by the class

A

Contracts

21
Q

Abstract class

A

A class which contains at least one abstract method is called abstract class

23
Q

Template Pattern

A
  • Several subclasses share the same algorithm but differ on the specifics
  • Common steps should not be duplicated in the subclasses
25
Q

Observer Pattern: Three variants for maintaining the consistency

A

o Push Notification: Every time the state of the subject changes, all the observers are notified of the change
 Push-Update Notification: The subject also sends the state that has been changed to the observers
o Pull Notification: An observer inquires about the state the of the subject
• Also called Publish and Subscribe.

26
Q

Reuse of Implementations. developers reuse code quickly by subclassing an existing class and refining its behavior. A Set implemented by inheriting from a Hashtable is an example of implementation inheritance.

A

Implementation Inheritance

27
Q

Class libraries vs. Frameworks

A

Class Library:

  • Provide a smaller scope of reuse
  • Less domain specific
  • Class libraries are passive; no constraint on the flow of control

Framework:

  • Classes cooperate for a family of related applications.
  • Frameworks are active; they affect the flow of control
28
Q

Peer-to-Peer

A

• Generalization of Client/Server Architectural Style. “Clients can be servers and servers can be clients”

29
Q

Implementing Contract Violations

A

• If object-oriented langauages support exceptions, we can use their exeception mechanisms for signialing and handling contract violations

30
Q

Implementation Inheritance:

A
The combination of  inheritance and implementation
 The Interface of the super class is completely inherited
 Implementations of methods in the super class ("Reference implementations") are inherited by any subclass
31
Q

Abstract Factory Pattern

A

is a software creational design pattern that provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes.

32
Q

Command Pattern

A

• The command pattern can be nicely used to decouple interface objects from control objects:
Only the Command objects modify entity objects. When the user interface is changed (for example, a menu bar is replaced by a tool bar), only the interface objects are modified.

34
Q

Composite Pattern

A
  • A software system consists of subsystems whish are other subsystems or collections of classes
  • Composite: Subsystem (A software system consists of subsystems which consists of subsystems, which consists of subsystems, which…)
  • The composite Pattern lets client treat individual objects and composites of these objects uniformly.
  • Models trees with dynamic width and dynamic depth
35
Q

Describe a Bridge

A

A Bridge is used upfront in design to let abstractions and implmentations vary independently. Delegation followed by Inheritance.

36
Q

are in charge of realizing use cases. represents the activity.

A

Control

38
Q

• A mechanism for code reuse in which an operation merely resends a message to another class to accomplish the desired behavior.

A

Delegation

39
Q

Client-Server

A

• One or many servers provide services to instances of subsystems, called clients • Each client calls on the server, which performs some service and returns the result. The clients know the interface of the server