Due: Thu, 25 Sep 2014, 10pm
70 pts, 7% of total grade.
Write a program to solve Australian Voting in C++ and when reassigning the ballots of a loser, you do not iterate over all the ballots:
You may not use new, delete, malloc() or free(). You may use the STL.
These are additional descriptions of the underlying math:
- Estimate time to completion.
- Create a private Git repository at GitHub, named cs371p-voting.
- Add at least 10 of these requirements as issues to the issue tracker at GitHub.
Add at least 10 more issues, one for each bug or feature, both open and closed with a good description and a label.
- Invite the graders to your private code repo.
- Clone your private code repo onto your local directory.
- Make at least 5 commits, one for each bug or feature.
If you cannot describe your changes in a sentence, you are not committing often enough.
Make meaningful commit messages identifying the corresponding issue in the issue tracker (see here).
- Write unit tests in TestVoting.c++ that test corner cases and failure cases until you have an average of 3 tests for each function, confirm the expected failures, and add, commit, and push to the private code repo.
- Implement and debug the simplest possible solution in Voting.h and Voting.c++ with assertions that check pre-conditions, post-conditions, argument validity, and return-value validity, until all tests pass, and add, commit, and push to the private code repo.
- Combine Voting.c++ and RunVoting.c++ into UVaVoting.c++ (don't forget to remove the #include).
- Submit UVaVoting.c++ to UVa and confirm the likely result of time exceeded or wrong answer.
- Debug the code until it's accepted by UVa, and add, commit, and push to the private code repo.
- Create 1000 lines of acceptance tests in RunVoting.in that test corner cases and failure cases, and add, commit, and push to the private code repo.
- Clone the public test repo onto your local directory.
It is critical that you clone the public test repo into a different directory than the one you're using for your private code repo.
- Copy your unit tests and your acceptance tests to your clone of the public test repo, rename the files, do a git pull to synchronize your clone, and then add, commit and push to the public test repo.
The files MUST be named EID-RunVoting.in, EID-RunVoting.out, EID-TestVoting.c++, and EID-TestVoting.out in the public test repo.
- Implement and debug the simplest possible cache until all tests pass, and add, commit, and push to the private code repo.
- Submit and debug until accepted by UVa and add, commit, and push to the private code repo.
- Run Doxygen, which will create html/, that then documents the interfaces to your functions.
Create inline comments if you need to explain the why of a particular implementation.
Use a consistent coding convention with good variable names, good indentation, blank lines, and blank spaces.
- Create a log of your commits in Voting.log.
- Obtain the git SHA with
git rev-parse HEAD
- Fill in the Google Form.
- 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.
Requirements for getting a non-zero grade.
- [ 5 pts] GitHub private repo with graders invited as collaborator and a log of the commits.
- [ 5 pts] GitHub issue tracker with issues from requirements and more.
- [15 pts] Accepted solution to UVa 10142 (C++ 4.3.2) and when reassigning the ballots of a loser, you do not iterate over all the ballots.
- [15 pts] Average of 3 unit tests per function with good coverage in the public test repo with the precise naming of the files.
- [15 pts] 1000 lines of acceptance tests in the public test repo with the precise naming of the files.
- [10 pts] Doxygen documentation.
- [ 5 pts] Google Form with time estimate.
- Your solution will be verified. Your solution will also be tested against the acceptance tests of five other students. You will be given a max of 10 penalty pts, 2 penalty pts for every set of tests that break your solution.
- Your acceptance tests will be verified. Your tests will also be used to test the solution of five other students. You will be given a max of 10 bonus pts, 2 bonus pts for every solution that your tests break.
- You can earn another 5 bonus pts, 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.
Only one solution must be turned in for the pair. If two solutions are turned in, there will be a 10% penalty, and the later one will be graded.
- Bonus pts will not increase the total score beyond the max score.
Private Code Repo Files
Place the following files, with these exact names, directly in cs371p-voting, no subfolders:
- RunVoting.c++ (do not run gcov, do not run valgrind)
- RunVoting.in (1000 lines)
- RunVoting.out (no gcov output, no valgrind output)
- TestVoting.c++ (average of 3 unit tests per funciton/method, run gcov, run valgrind)
- TestVoting.out (include gcov output, include valgrind output)
- Voting.html (output of Doxygen)
- Voting.log (output of git log)
- UVaVoting.c++ (concatenation of Voting.c++ and RunVoting.c++)
- gitignore.txt (rename .gitignore, for your use only, no need to submit)
- makefile (for your use only, no need to submit)
Public Test Repo Files
Place the following files, with these exact names, directly in cs371p-fall-2014/voting-tests/, no subfolders:
- EID-RunVoting.in (1000 lines)
- EID-RunVoting.out (no gcov output, no valgrind output)
- EID-TestVoting.c++ (average of 3 unit tests per funciton/method, run gcov, run valgrind)
- EID-TestVoting.out (include gcov output, include valgrind output)
- Atlassian Git Tutorials
- Git Cheat Sheet
- Git Generating SSH Keys
- Git Guides
- Git Guides
- Git Immersion
- Git Reference
- Google C++ Style Guide
- Try GitHub
|Name||GitHub ID||GitHub Test Repository||Google Form|
|Henry Chen||chukhinhenry||voting-tests||Google Form|