Object Orientated Paradigms Flashcards

1
Q

What is inheritance?

A

A method of reusing code from the superclass where attributes and methods can be added and extended without affecting the original class

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

What is encapsulation?

A

Where attributes are made to be accessible only through the methods provided by the object (basically just private variables)

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

What is static polymorphism?

A

When you implement multiple methods of the same name but different parameters in a single class. Also known as method overloading

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

What is dynamic polymorphism?

A

When a subclass overrides a method from the superclass of the same name, meaning two methods can have the same name depending on which is referenced

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