Lecture 6 Flashcards

1
Q

What is a sequence model?

A

It shows the sequence of object interactions.

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

What are the three types of arrows?

A
  • Solid arrow, filled head: synchronous messages
  • Solid arrow, stick head: asynchronous messages
  • Dotted arrow, stick head return message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three object-oriented relationships?

A
  • Uses
  • Has-a
  • Is-a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a ‘uses’ relationship?

A

Needed to accomplish work, but not “part of” the object itself

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

What is a ‘has-a’ relationship?

A

• Composing a system from smaller systems

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

What is a ‘is-a’ relationship?

A
  • Manifested in inheritance

* Derived types inherit behaviour and attributes from more basic types

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

What are three guidelines for OOP?

A
• "Program to an 'interface', not an 'implementation'."
• "Favour 'object composition' over 'class inheritance'."
• Loose coupling through “acquaintance” (Uses) can lead to easier maintainability than stronger coupling through
“aggregation” (Has A).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are creational patterns?

A

Patterns typify methods of instantiating objects

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

What are structural pattrens?

A

Structural patterns typify ways of organizing and combining objects – concerned with increasing flexibility through class and object composition

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

What are behavioural patterns?

A

Behavioural patterns typify inter-object communication –concerned with fundamental object services/actions and details of their provision

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

What is a singleton pattern?

A

Ensure a class has only one instance, and provide a global point of access to it.

Static instantiation.

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

What is the observer pattern?

A

Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. EventListener in Vaadin.

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

What is the factory pattern?

A

Subclass Creator to provide specific implementation of creation method Subclass decides what to instantiate

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

What is the proxy pattern?

A

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

4 types: virtual, remote, protective, smart

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