Implement a VotingMachine class that can be used for a simple election. Have methods to clear the machine state, to vote for a Democrat, to vote for a Republican, and to get the tallies for both parties. Extra credit if your program gives the nod to your favored party if the votes are tallied after 8 p.m. on the first Tuesday in November, but acts normally on all other dates. (Hint: Use the GregorianCalendar class - see Programming Project 2.1.)

Complete the following files:

VotingMachine.java

VotingMachineTester.java

Use the following file:

VotingSimulation.java

/**
   This program simulates an election.
*/
public class VotingSimulation
{  
   public static void main(String[] args)
   {  
      VotingMachine vm = new VotingMachine();
      vm.clear();
      
      vm.voteForDemocrat();
      vm.voteForRepublican();
      vm.voteForDemocrat();
      vm.voteForRepublican();
      vm.voteForRepublican();

      System.out.print("Democrats: ");
      System.out.println(vm.getDemocratVotes());
      System.out.print("Republicans: ");
      System.out.println(vm.getRepublicanVotes());
   }
}