OBJECT-ORIENTED PROGRAMMING
Object-Oriented Programming, or OOP, is a popular programming technique often utilized. The idea behind object-oriented programming is that an object is created, along with various functions that the object corresponds to. Every object in programming has its attributes and its behaviours. For example, if the object were a car, its attributes would include gasoline and what type of car it is; its behaviour would include driving, reversing and parking. Object-oriented programming also provides a key number of new concepts and functions that make programming much easier. These concepts and functions include inheritance, which allow objects to inherit the properties and behaviours of other objects (e.g. trucks inheriting the properties and behaviours of vehicles) and polymorphism, which allow objects to behave differently under different circumstances. OOP is therefore quite useful in making programming an overall easier and simpler process for the experienced programmer.
RECURSION
Recursion is a programming technique among the likes of for loops and while loops. The basic definition of recursion is that it is the process in which a function repeatedly calls itself by the definition of the function itself. Mathematical concepts, such as factorials, are thought of as recursive processes, and are therefore expressed in programming as recursive functions. Recursion, although useful in this sense, is not exactly useful in terms of efficiency. If, for example, recursion is used to repeatedly call a function multiple times, it would take longer to reach the base case of that recursive function. Therefore, utilizing a loop would be deemed better in terms of efficiency. However, recursion does have its benefits, as it can be used to simply the problem at hand, which is what
mathematical concepts such as factorials need: simplification.