OOP classes Flashcards

(8 cards)

1
Q

Define encapsulation

A

All of the object’s attributes are contained and hidden in the object by giving them the private access modifier. They are accessed through public getter and setter methods.

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

Define instantiation

A

The process of creating an instance of a class.

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

Define a class

A

A blueprint for creating an object.

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

Define an access modifier

A

For example public and private which can be applied to attributes and methods in the class. Private means the attribute or method can not be accessed by code in another class while public means it can.

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

Define an attribute.

A

A specific piece of data representing a particular characteristic of an object.

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

Define a constructor.

A

A method that is called when creating an instance (object) of a class.

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

Define an object.

A

An instance of a class.

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

Define methods.

A

For example getters and setters and other subroutines that define the behaviour of the object.

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