星期五, 6月 17, 2005

Lab 6/17 Recursion

Study Display 11.3
Develop a recursive java code that computes factorial of N where N!= 1* 2 * 3 * ... * (N-1) * N.

Bonus problem:
Do Project 11.3 Tower of Hanoi. Try this video game.

星期五, 6月 10, 2005

Lab 6/10

Lab sorting
(if you have not finished yet.)

Lab Modularized Sorting.
(if you have already done Lab sorting.)

Lab Modularized Sorting

Rewrite the sorting program in the Lab Sorting so that
the sorting procedure is now a reusable method.

6/10 Homework (Equal Arrays)

Study Display 6.3 and define two arrays
int[] a={1,9,6,4,0,2,1,2} and int[] b={1,9,6,4,0,2,1,2}.
Write a program to verify that they are equal.