Homework 1
CS202, Summer 2006

Due: Saturday, July 1

Please upload your source code files using CSNS. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.


1. The number of different combinations that can be made by choosing m objects out of n objects is usually denoted as C(n,m), and can be calculated with the formula C(n,m) = n! / ( m! * (n-m)! ). For example, C(4,2) = 4! / (2! * (4-2)!) = 4 * 3 * 2 * 1 / ( 2 * 1 * 2 * 1 ) = 6. Write a Java program which does the following:

2. (25pt) Implement a recursive binary search method, and write a Java program to test your method.