01:198:111 Lecture Notes - Lecture 12: Object-Oriented Programming, Instance Variable
01:198:111 verified notes
12/28View all
Document Summary
Recursion review instances of the same problem 9as opposed to iteration) The process in which a function calls itself directly or indirectly. Method of solving a problem where the solution depends on solutions to smaller. Recursive function is defined by 2 cases. Smallest input - already know the answer. Recursive case - call to self to perform subtask. Defined in terms of << smaller >> version of itself. Not having a base case will have the recursive function infinitely repeat as there is now no smallest input. A variable is used to store information. It represents a value, a state in emory. Variables only are limited to describe advanced concepts or elements. This is the very basis of object oriented programming. There has to be attributes and methods. We do not have to open the case to use it. We have some controls to use on it.