Lecture 16 - MVC Flashcards

1
Q

Design Patterns

A

Standard Solutions which are “good” in many situations but we will need to tailor them to specific situations.

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

MVC

A

Typically used to construct GUI. Allows us to decouple Model and View. Model is data and operations on data. View is what we see in the User Interface. A controller is used to change the model.

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

Observer and Observable

A

Observer - Object that wants to updated when the state of an object changes.
Observable - An object of which the state can be interesting to another object.

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

Methods in Observable

A

setChanged - Indicates that this object has changed.
hasChanged - Tests if this object has changed.
clearChanged - Indicates that the object has no longer changed or that it has notified all its observers. Automatically called by notifyObservers.
notifyObservers - Notifies all its observers that the object has changed.

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