Lecture 10 Flashcards

1
Q

What are three types of reuse?

A
  • Libraries
  • Toolkits frameworks
  • Components
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Reuse, what is a library?

A

-reusable, importable code, typically single purpose

E.g.: OpenGL, OpenCV

Functionality accessed through the API.

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

Reuse, what is a framework?

A

A framework is a set of cooperating classes that make up a reusable design for a specific class of software

Frameworks permit realization or specialization primarily by subclassing at “well-articulated extension points

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

Reuse, what is a component?

A

multiple use, non-context-specific, composable, encapsulated, independently deployed and versioned (Szyperski and Messerschmitt, 2002)

Vaadin widgets are an example of components

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

What is a collection?

A

a group of objects

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

What is a list?

A

A collection that is ordered by a numerical

index. Duplicate elements are possible.

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

What is a set?

A

A collection that permits no duplicates. A set may or may not be ordered.

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

What is a map?

A

A collection that links keys to corresponding values. Keys may or may not be ordered.

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

What is the iterator pattern?

A

Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

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

What is the adaptor pattern?

A

Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.

American plug, adapter, European socket

(NASA/SpaceX adapter example)

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

What is the proxy pattern?

A

Provide a surrogate or placeholder for another object to control access to it.

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

What is the decorator pattern?

A

Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extended functionality.

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