org.gswing.components.common
Class FptpVote

java.lang.Object
  extended by org.gswing.components.common.Vote
      extended by org.gswing.components.common.FptpVote

public class FptpVote
extends Vote

Purpose: Represents a vote in a First Past the Post election.


Constructor Summary
FptpVote(int constituency, int electionNo, int votes, int candidateNo)
          Constructor.
 
Method Summary
 int getCandidateNo()
          Get the candidate number for this vote.
 
Methods inherited from class org.gswing.components.common.Vote
getConstituency, getElectionNo, getVotes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FptpVote

public FptpVote(int constituency,
                int electionNo,
                int votes,
                int candidateNo)
Constructor.

Parameters:
constituency - The unique constituency number.
electionNo - The unique election number.
votes - The number of votes for a particular candidate / party.
candidateNo - The unique candidate number that recieved the votes.
Method Detail

getCandidateNo

public int getCandidateNo()
Get the candidate number for this vote.

Returns:
The unique candidate number.


Copyright © 2008. All Rights Reserved.