Object-Oriented Programming

CS371p: Fall 2009: 54850

3. Voting

Write a program to solve the following UVa problem: Australian Voting.

When reassigning the ballots of a loser, you must not iterate over all the ballots.

Input


As described in UVa.

Ouput


As described in UVa.

Correctness (10 pts)
[no partial credit and required for any other credit]


Your program must produce the correct output from the provided input.
Use Google Groups to reach consensus on the acceptance tests.

Additional Correctness (10 pts)


Either get your program accepted without a presentation error by UVa or pass additional acceptance tests created by the grader.

Testing (10 pts)


Create a set of additional CppUnit tests in TestVoting.h and TestVoting.out.

Create a set of additional acceptance tests in Voting.in and Voting.out.

You must use Valgrind and get no errors.

Design (5 pts)


You must not use new or delete or malloc() or free().

You must use assert() to check pre-conditions, post-conditions, argument validity, return-value validity, and invariants.

Worry about this last, but your program should run as fast as possible and use as little memory as possible.

Documentation (5 pts)


You must edit Voting.txt with a plain-text editor. Do not use Word!

You must use Google Project’s wiki to document your program.

You must use Doxygen to document interfaces:

  • variables
  • functions
  • classes
  • methods
  • parameters (@param)
  • returns (@return)
  • exceptions (@throws)

You must use C-style (/*…*/) or C++-style (//…) comments to document implementations.

Follow any coding convention, but be consistent. Use good variable names. Write readable code with good indentation, blank lines, and blank spaces.

Source Control (5 pts)


You must use Subversion to manage your files.

Bug Tracking (5 pts)


You must use Google Project’s bug tracker to manage your bugs.

Submission


Every individual must submit the following to Turnin:

Type Name Description
overview Voting.txt Overview of the submission.

Every pair must submit the following to Turnin:

Type Name Description
documentation html Documentation of the program,
produced by Doxygen.
program main.c++ Definition of the program.
tests TestVoting.h Definition of the CppUnit tests.
input Voting.in Input of the program,
acceptance tests.
output Voting.out Output of the program,
acceptance tests
with Valgrind.
TestVoting.out Output of the program,
CppUnit tests
with Valgrind.
source control Subversion.log Log of Subversion commits.

Every individual must post the following to their UT Blog:

  • predicted number of hours to complete
  • actual number of hours to complete
  • execution time (if accepted)
  • rank (if accepted)
  • Voting.out (as a page)
  • TestVoting.out (as a page)

References