CS 580 Client-Server Programming

Spring Semester, 2007

Assignment 3

Assignment Index

© 2007, All Rights Reserved, SDSU & Roger Whitney

 San Diego State University -- This page last updated 3/15/07

Assignment 3

Due April 5

Client-Server Voting System

Modified March 15

This assignment is to design a protocol for a client server voting system which is described below.  

An election (or poll) has a label, some optional descriptive text, a start and end date, and list of options one can select. For example we might have an election to determine peoples favorite programming languages.  So we might have:

label: Vote for your favorite programming language

Descriptive text: Select one of the following

Start date: March 12, 2007

End date: March 30, 2007

Options (list items separated by a comma): C, C++, Java, Ruby, Python, Lisp, Smalltalk, Erlang, Other

We can not have two elections or polls active with the same label active at the same time. We could have a new election or poll with the label " Vote for your favorite programming language" that that starts March 31, 2007. We could have a poll labeled "Vote for your favorite scripting language" that is active when the above poll is active. After a poll ends users can see the results of the poll but can not vote on the poll. While a poll is open a registered user can vote on the poll and change their vote. However they can not have two votes count in the same election or poll.

There are three types of users of the system, anonymous, registered users and monitors.

An anonymous user can view the status of the votes but can not vote. While a poll in active one can view the current vote total. An anonymous user can also register to become a registered user. To register a user provides a valid email address (as an id), a password and a nickname. The email address and the nickname need to be unique in the system. That is two registered users cannot have the same email address for an id. Also two registered users cannot have the same nickname. The nickname will be used in a future update of the system that support user comments.

When a registered user logs on they can see a list of open elections. They can cast a vote in any open election. If they have already voted in that election the new vote replaces the old vote. A registered user can also see a list of closed elections and their results.

System administrators add monitors to the system. Monitors have and id( valid email address), a password and a nickname. Monit ors can perform the same operations that register users can. They can also add polls (elections). When the system is expanded to allow user comments monitors will also be able to remove comments and remove registered users.

The only other constraint on the protocol is that protocol is to be stateful.

What to turn in.

Turn is a description of your protocol. One of the student protocols will be selected as the protocol that everyone will implement. This means that the protocol should be understandable by other students. It should be complete so that it supports all the needed functionality. It also needs to be parseable. Turn in a hard copy of your description of the protocol and an electronic copy of the protocol . These will be used to help select which protocol to implement.