CS2
Recursion
4
Recursive Method
nAn recursive method  is a method that contains a statement (or statements) that makes a call to itself.
nImplementing the factorial of N recursively will result in the following method.
public int factorial( int N )
{
if ( N == 1 ) {
return 1;
}
else {
return N * factorial( N-1 );
}
}
Test to stop or continue.
Recursive case: recursion continues.
End case: recursion stops.
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.