Voting


Due: Wed, 15 Feb 2012, 8pm
65 pts, 6.5% of total grade.


Specification


Write a program to solve the Australian Voting problem in C++:

For all projects, the minium requirement for getting a non-zero grade is to satisfy all of the requirements in the table below, including the precise naming of all the files.

For this project, the additional minium requirement for getting a non-zero grade is that UVa accept your solution and that when reassigning the ballots of a loser, you do not iterate over all the ballots.

You can earn 5 pts of extra credit, if you work with a partner using pair programming and vouch for the fact that you worked on the project together for more than 75% of the time.

Analysis


These are additional descriptions of the underlying math:

Issues and Submission


Points Description Files Submission
1 5 pts Issue Tracker and Wiki
Set up a public issue tracker and wiki at Google Project Hosting:
  • http://code.google.com/p/<cs-username>-cs371p-voting/
Issue Tracker
Track the 8 deliverables on this page.
Track bugs and features, both open and closed.
Categorize, prioritize, and describe each issue adequately.
Track at least 5 more issues in addition to the 8 issues on this page.
Wiki
Describe the design of the algorithm.
Write at least 30 lines of description.
Use bullet points where appropriate.
In general, write grammatically correct, typo free, clear English.
Have someone else read what you wrote and critique it.
Write neatly.
Google (public)
2 5 pts Private Git Repository
Set up a private Git repository at Assembla:
  • https://www.assembla.com/code/<cs-username>-cs371p-voting/git/nodes/
Invite the grader to your repository:
  • Alon Farchy (afarchy)
  • Oliver Jensen (ojensen5115)
Commit at least 5 times.
Commit once for each bug or feature.
If you cannot describe your changes in a sentence,
you are not committing often enough.
Write meaningful commit messages and
identify the corresponding issue in the issue tracker.
Create a log of the commits.
Push frequently.
It is your responsibility to protect your code
from the rest of the students in the class.
If your code gets out,
you are as guilty as the recipient of academic dishonesty.
Voting.log Assembla (private)
Turnin (zip)
3 15 pts Unit Tests
The grader will set up a public Git repository at Assembla: Write unit tests before your write the code.
When you encounter a bug, write a unit test that fails,
fix the bug, and confirm that the unit test passes.
Write at least 3 unit tests for every function.
Tests corner cases and failure cases.
Name tests logically.
Push and pull the unit tests to and from the grader's repository.
Prepend <cs-username>- to the file names at Assembla.
Reach consensus on the unit tests.
Use Valgrind.
TestVoting.c++
TestVoting.out
Assembla (private)
Assembla (public)
Turnin (zip)
4 15 pts Acceptance Tests
Write acceptance tests before your write the code.
When you encounter a bug, write an acceptance test that fails,
fix the bug, and confirm that the acceptance test passes.
Write an auxiliary program to randomly generate acceptance tests.
Create at least 1000 acceptance tests.
Tests corner cases and failure cases.
Push and pull the acceptance tests to and from the grader's repository.
Prepend <cs-username>- to the file names at Assembla.
Reach consensus on the acceptance tests.
Use Valgrind.
RunVoting.c++
RunVoting.in
RunVoting.out
Assembla (private)
Assembla (public)
Turnin (zip)
5 15 pts Implementation
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.
Voting.h Assembla (private)
Turnin (zip)
6 5 pts Documentation
Use Doxygen to document the interfaces.
The above documentation only needs to be generated from Voting.h.
Comment each function meaningfully.
Use comments only if you need to explain the why of a particular implementation.
Choose a coding convention and be consistent.
Use good variable names.
Write readable code with good indentation, blank lines, and blank spaces.
html/*
Assembla (private)
Turnin (zip)
8 5 pts Google Form
Fill out the grader's Google form:
Google (form)
8 Turnin
Submit the project to the grader's Turnin account:
  • Oliver Jensen (cs371ppj2 / ojensen)
Include a README.txt file that contains:
  • name
  • EID
  • Assembla URL
  • Google URL
Files
  • html/
  • README.txt
  • RunVoting.c++
  • RunVoting.in
  • RunVoting.out
  • TestVoting.c++
  • TestVoting.out
  • UVaVoting.c++
  • Voting.h
  • Voting.log
<cs-username>-Voting.zip Turnin (zip)