Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
D7 deliverable of the PSD3 course
Java
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext
src/uk/ac/glasgow
tests
.gitignore
Level3ElectorateGUIDs.csv
Level5ElectorateGUIDs.csv
Makefile
README.md
UserList.csv
build.xml

README.md

DangerousDoughnuts (Team D) PSD3 voting system exercise

Building

(Obviously, you need to have Apache Ant installed to proceed)

These ant commands are interesting:

  • ant build — builds .class files to bin/
  • ant apidocs — build API documentation for .java files
  • ant junit — execute test cases
  • ant run — execute the CLI

Simply running

ant

will build class files and create api documentation.

Launching your test cases

Our test cases have been provided in tests/ folder. You may add any more JUnit tests, only requirement is all test files must include Test in their filenames, otherwise they will not be noticed by JUnit.

This package bundles JUnit version 4.10. Please note your Ant installation must have JUnit support library anyway!

Configuring test fixtures

These files contain fixtures:

At the moment there are two electorates hard coded: level 3 and level 5. Electorate names cannot be changed, but users can be added and removed.

  • UserList.csv is a tab-separated file of users registered in the system. Fields are as follows:

    1. First name
    2. Last name
    3. GUID
    4. Password
    5. ElectionManager flag ("true" or "false")
  • Level3ElectorateGUIDs.csv contains GUIDs for Level 3 electorate.

  • Level5ElectorateGUIDs.csv contains GUIDs for Level 5 electorate.

VotingSystem interface implementation

The implementation of the VotingSystem.java interface is located in the VotingSystemImpl class inside the uk.ac.glasgow.demosocs.impl package. The command line interface is implemented in VotingSystemCommandLineUI class inside uk.ac.glasgow.demosocs.impl.ui.

Contacting us

In the event of a (What a) Terrible Failure, please direct your hope to dangerousdoughnuts@googlegroups.com.

Something went wrong with that request. Please try again.