/*********************************************************************** * This is the basic class for people in our simulation. Voters, * Candidates, and Representatives are all subclasses of this Individual * class. These are the basic attributes that each person will have. ***********************************************************************/ public class Individual { public int[] ideology; // Vector of positions on the Issues public double[] strengths; // Vector of Weights associated with ideology public int[] votingRecord; // Binary vector for votes on proposed issues public int[] partyTag; // Binary vector recording current party public String name; public District parent; // Finds the similarity between the incoming tag and the // partyTag of the Individual. Returns the deviation from the expected // similartiy of partyTag.length/2 public double findSimilarity(int[] otherTag) { double tagSimilarity = 0; for (int i=0; i