Election2004
Class VoteTable

java.lang.Object
  |
  +--Election2004.VoteTable

public class VoteTable
extends java.lang.Object

VoteTable remembers the votes for the 2004 US Presidential Election


Constructor Summary
VoteTable()
          Constructor VoteTable initializes the table
 
Method Summary
 java.lang.String computeTotals()
          computeTotals reports the total votes for the three candidates
 void voteForBush()
          voteForBush adds one more vote to Bush's totals
 void voteForKerry()
          voteForKerry adds one more vote to Kerry's totals
 void voteForNader()
          voteFornader adds one more vote to Nader's totals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoteTable

public VoteTable()
Constructor VoteTable initializes the table
Method Detail

voteForBush

public void voteForBush()
voteForBush adds one more vote to Bush's totals

voteForKerry

public void voteForKerry()
voteForKerry adds one more vote to Kerry's totals

voteForNader

public void voteForNader()
voteFornader adds one more vote to Nader's totals

computeTotals

public java.lang.String computeTotals()
computeTotals reports the total votes for the three candidates
Returns:
a string that lists the candidates and their votes.