Lecture 2: The Object-Oriented Model Flashcards

1
Q

Model

A

An overview or representation of something. It overlooks all irrelevant details and focuses on the ones we are interested in.

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

Object-oriented model

A

A way of making the model of a system so that each object in real life is represented by a corresponding object in the model. It focuses on the individual objects and their interactions.

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

List 4 advantages of the OO model

A
  • People tend to naturally think in terms of objects and their interactions, so it is easier to understand
  • Easily map reality
  • Easy to develop
  • Easy to break down into smaller parts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Properties of an object

A
  • a unique identity
  • state (attributes) –> represented by variables (fields)
  • well-defined behaviour (operations) –> performed by functions (interface)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Data encapsulation

A

Hiding the internal state and implementation of an object, and only allowing access through an interface.

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

Advantages of data encapsulation

A

Simplification: the entire object can be taken as a whole without focusing on the internal details.
Provides barrier against direct changes

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