Homework 1
CS202, Summer 2004


Due: Thursday, July 1

Please email your solutions to csun@calstatela.edu, and make sure to use CS202 Summer 04 HW1 as the subject of the email. The email should include your name, and the .java files for all the exercises as attachments. For all homework assignments and projects, failing to comply with the required code conventions (see Review of Language Basics, slide #7) will incur a credit penalty up to 10% of the total credit for the assignment.


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.