Class Candidate

java.lang.Object
  |
  +--Individual
        |
        +--Candidate

public class Candidate
extends Individual

Candidates can be created from either Voters or Reps. If created from a Voter, the Voter's place in the District Vector is kept as part of it's internal variables. If created from a Rep, then the incumbent tag is changed to true and the age of the candidate is set equal to the age of the Rep. Candidates will adapt in future versions of this program.


Field Summary
 int age
           
 boolean incumbent
           
 double majority
           
 int VoterID
           
 int votesReceived
           
 
Fields inherited from class Individual
ideology, name, parent, partyTag, strengths, votingRecord
 
Constructor Summary
Candidate(Rep tempCand)
           
Candidate(Voter tempCand, int ID)
           
 
Method Summary
 void Crossover(int[] newIdeo)
           
 
Methods inherited from class Individual
CrunchTag, findSeparation, findSimilarity, fliptag, levelIndex, showIdeology, showRecord, showTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

incumbent

public boolean incumbent

VoterID

public int VoterID

age

public int age

votesReceived

public int votesReceived

majority

public double majority
Constructor Detail

Candidate

public Candidate(Voter tempCand,
                 int ID)

Candidate

public Candidate(Rep tempCand)
Method Detail

Crossover

public void Crossover(int[] newIdeo)