CS 580 Client-Server Programming

Spring Semester, 2006

Assignment 1

Assignment Index

© 2007, All Rights Reserved, SDSU & Roger Whitney

 San Diego State University -- This page last updated 1/18/07

Assignment 1

Due Feb 1

1. Create a EvenQueue class that has the methods enqueue and dequeue. The enqueue method throws an exception when its one argument is not an even integer. When its one argument is an even integer, the integer is placed on the queue. When dequeue is called on an empty queue it returns null. Write unit tests for your queue . Add your code to a source code repository.

2. Modify your queue in 1 to throw an exception when dequeue is called on an empty queue . Add this modified code to your source code repository. Don't forget your unit tests.

3. Modify your queue in 1 to ignore arguments of enqueue that are not even integers rather than throw an exception. Check your code in as a second branch to your source code repository .

4. Merge the two branches in your repository to create a queue that meets the requirements of 2 & 3.

The goal of this assignment is to practice writing unit tests and using a source code repository.  Given a source code repository you need to be able to:

  1. Check code in

  1. Check out different version of your code

  1. Create branches of your code

  1. Merge different branches of code and resolve any conflicts.

You will turn in hard copy of part 4 of the assignment.