Recursion And OOP Flashcards
1
Q
Recursion
A
- is a problem solving technique we use to solve problems when the problem can be broken into smaller and smaller versions of the same problem
- must have a base case (STOP)
2
Q
Object oriented programming
A
- a way to program that focuses on programmatic objects and their interactions
- are often analogous to real world things
- have fields (pieces of data that describe them)
- functions(describe their behaviour)
- also called classes
3
Q
Inheritance
A
- we can define objects as subclasses or more general parent objects
- have a ‘is-a’ relationship with their parents
- subclasses inherit all the attributes and methods of their parents but can also have some specific to them