|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--District
The District class holds all of our Voters, Candidates, and Reps. Voters are created during construction of the District. Candidates are placed in a Candidate Pool and drawn from the Voters. The District is also responsible for conducting votes and electing Reps to Congress.
| Field Summary | |
Pool |
CandidatePool
|
int |
center
|
Rep |
CurrentRep
|
Congress |
Government
|
double |
maxSeparation
|
int[] |
median
|
int |
medianUtility
|
java.lang.String |
name
|
int |
numberOfBills
|
int |
policies
|
int |
positions
|
int |
SPREAD
|
int |
tagLength
|
int |
termLimit
|
| Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
District(int numVoters,
int policies,
int numberOfBills,
int positions,
int tagLength,
java.lang.String districtName,
int termLimit)
|
|
| Method Summary | |
Candidate |
ConductVote()
|
Rep |
ElectRep()
|
void |
FindCandidates()
|
double |
findCentrality(Individual person)
|
void |
findMedian()
|
| Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
removeRange,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
toString,
trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public int policies
public int numberOfBills
public int positions
public int tagLength
public int termLimit
public Pool CandidatePool
public java.lang.String name
public Rep CurrentRep
public Congress Government
public double maxSeparation
public int[] median
public int medianUtility
public int center
public int SPREAD
| Constructor Detail |
public District(int numVoters,
int policies,
int numberOfBills,
int positions,
int tagLength,
java.lang.String districtName,
int termLimit)
| Method Detail |
public void findMedian()
public double findCentrality(Individual person)
public void FindCandidates()
public Candidate ConductVote()
public Rep ElectRep()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||