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
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)
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
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