Object Oriented Terminology Flashcards
1
Q
What is a Class?
A
The blueprint to create an object
2
Q
What is an object?
A
An instance of a class
3
Q
What is encapsulation?
A
Assigning levels of access to variables, methods and classes
4
Q
What is the benefit of inheritance?
A
Gives the program robustness for reuse / future use
5
Q
What is inheritance?
A
- Derives new classes from existing classes
- Subclass retains specific attributes and methods from the superclass
6
Q
What are the 4 different access levels provided by encapsulation?
A
- Public can be used by any class from any package
- Private can only be used by the current class
- Protected can only be used via inheritance from the current class
- Package-wide (Default) allows all classes inside the current package to access