CS2
Recursion
3
Recursion
nThe factorial of N  is the product of the first N positive integers:
–   N * (N – 1) * (N – 2 ) * . . . * 2 * 1
nThe factorial of N can be defined recursively as
1 if N = 1
factorial( N ) =
N * factorial( N-1 ) otherwise
The two most important concepts in object-oriented programming are the class and the object. In the broadest term, an object is a thing, both tangible and intangible, which we can imagine.
A program written in object-oriented style will consist of interacting objects. For a program to maintain bank accounts for a bank, we may have many Account, Customer, Transaction, and ATM objects.
An object is comprised of data and operations that manipulate these data.