CS 580 Client-Server Programming
Spring Semester, 2009
Assignment
© 2009, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 1/22/09
Assignment 1
Due Jan 30 Midnight
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 from your commit in p roblem 1.
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:
Check code in
Check out different version of your code
Create branches of your code
Merge different branches of code and resolve any conflicts.
How to turn in your Assignment
You have been given a course subversion repository (svn://bismarck.sdsu.edu:8009/09/580/YourName). Create a top level directory called "assignment1" and place your files in that directory. Check in each each version of the code. The time stamp of the last checking will be used as when your assignment was turned in. Your assignment will be late if turned in any amount of time after Jan 30 midnight.