Complete Rules

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.

Answer:

No. It does not mention the base cases.

Complete Rules

A recursive definition (or program) must have two parts:

  1. If the problem is easy, solve it immediately.
  2. If the problem can't be solved immediately, divide it into smaller problems, then:
    • Solve the smaller problems by applying this procedure to each of them.
Fibonacci Series
N12345 678910
fib(N)11235 813213455

Here is an expanded version of fib(N):

fib(  ) =        (base case)

fib(  ) =        (base case)

fib( N ) = fib( N-1 ) + fib( N-2 )

QUESTION 16:

The rule seems to be plagued with blanks. Can you fill them?