- Timestamp:
- Jun 20, 2011, 3:22:33 PM (13 years ago)
- 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.assignment 1;1 package nl.rickvanderzwet.toos.assignment2; 2 2 3 import java.util.Calendar ;4 import java.util.HashSet ;5 import java.util.Enumeration ;3 import java.util.CalendarWrapTest; 4 import java.util.HashSetWrapTest; 5 import java.util.EnumerationWrapTest; 6 6 7 import nl.rickvanderzwet.toos.assignment 1.Voter;7 import nl.rickvanderzwet.toos.assignment2.VoterWrapTest; 8 8 9 9 import org.apache.log4j.BasicConfigurator; … … 29 29 30 30 /* 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) { 33 33 logger.debug("Sorry not today"); 34 34 return false; -
liacs/TOOS2010/assignment2/src/Voter.java
r206 r310 1 package nl.rickvanderzwet.toos.assignment1; 1 package nl.rickvanderzwet.toos.assignment2; 2 3 public class VoterWrapTest extends Voter { 4 public getVote_counter = 0; 5 6 public Boolean getVote() { 7 getVote_counter++; 8 return super.getVote(); 9 } 10 11 } 2 12 3 13 public class Voter { 4 public Voter() {5 fvote = null;6 }7 public Voter(Boolean vote) {8 fvote = vote;9 }10 11 14 public Boolean getVote() { 12 15 return fvote; 13 16 } 17 14 18 public Boolean fvote; 15 19 }
Note:
See TracChangeset
for help on using the changeset viewer.