1.2.4e OOP Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are objects?

A

Objects contain methods and attributes, and can link to each other.

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

What are classes?

A

Classes act as a template for the code and methods that will be used on an object.

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

What is a method?

A

A procedure which defines what an object can/can’t do.

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

What is an attribute?

A

Something that an object contains. Related to the behaviour of an object.

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

What is inheritance?

A

A new class keeps the same methods and attributes as its parent class, but may also contain unique methods and attributes.

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

What is polymorphism?

A

A subclass alters its inherited methods.

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

What is encapsulation?

A

Stops data from being overwritten by having private classes which can only be altered via its methods.

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

What are the advantages and disadvantages of using OOP?

A

Advantages => High reusability, encapsulation makes programs more robust and reliable.

Disadvantages => Generally unsuitable for smaller programs as classes won’t be reused.

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