CS 580 Client-Server Programming

Spring Semester, 2006

Assignment 1

Assignment Index

© 2006, All Rights Reserved, SDSU & Roger Whitney

 San Diego State University -- This page last updated 1/19/06

Assignment 1

Due Jan 26

1. Create a EvenStack class that has the methods pop and push. The push 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 stack. When pop is called on an empty stack it returns null. Write unit tests for your stack. Add your code to a source code repository.

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

3. Modify your stack in 1 to ignore arguments of a push 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 stack 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. You need to be prepared to perform the above listed operations on your source code repository in class.