Ignore:
Timestamp:
Jun 20, 2011, 3:22:33 PM (13 years ago)
Author:
Rick van der Zwet
Message:

Hacking with javascript and various other foo.

Location:
liacs/TOOS2010/assignment2/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • liacs/TOOS2010/assignment2/src/Census.java

    r237 r310  
    1 package nl.rickvanderzwet.toos.assignment1;
     1package nl.rickvanderzwet.toos.assignment2;
    22
    3 import java.util.Calendar;
    4 import java.util.HashSet;
    5 import java.util.Enumeration;
     3import java.util.CalendarWrapTest;
     4import java.util.HashSetWrapTest;
     5import java.util.EnumerationWrapTest;
    66
    7 import nl.rickvanderzwet.toos.assignment1.Voter;
     7import nl.rickvanderzwet.toos.assignment2.VoterWrapTest;
    88
    99import org.apache.log4j.BasicConfigurator;
     
    2929
    3030    /* Nobody likes voting on Tuesday don't they? */
    31     Calendar rightNow = Calendar.getInstance();
    32     if (rightNow.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY) {
     31    Calendar rightNow = CalendarWrapTest.getInstance();
     32    if (rightNow.get(CalendarWrapTest.DAY_OF_WEEK) == CalendarWrapTest.WEDNESDAY) {
    3333      logger.debug("Sorry not today");
    3434      return false;
  • liacs/TOOS2010/assignment2/src/Voter.java

    r206 r310  
    1 package nl.rickvanderzwet.toos.assignment1;
     1package nl.rickvanderzwet.toos.assignment2;
     2
     3public class VoterWrapTest extends Voter {
     4  public getVote_counter = 0;
     5
     6  public Boolean getVote() {
     7    getVote_counter++;
     8    return super.getVote();
     9  }
     10
     11}
    212
    313public class Voter {
    4   public Voter() {
    5     fvote = null;
    6   }
    7   public Voter(Boolean vote) {
    8     fvote = vote;
    9   }
    10 
    1114  public Boolean getVote() {
    1215    return fvote;
    1316  }
     17
    1418  public Boolean fvote;
    1519}
Note: See TracChangeset for help on using the changeset viewer.