OOP Flashcards
1
Q
What is a protected attribute?
A
An attribute that can be accessed within its class and by subclasses.
2
Q
What is a private attribute?
A
An attribute that can only be accessed by its class.
3
Q
What is overloading used for (OOP technique)?
A
It is used to provide multiple implementations of a method with the same name.
This is done by selecting which version to run based on the number and type of parameters used.
4
Q
What is a class (OOP)?
A
An object type that defines some fields and the functions that act on these fields.
5
Q
What is inheritance (OOP)?
A
When a class shares the same characteristics as its parent class.