Loading src/edu/bu/ec504/hw1p1/MyDistinctCounter.java +5 −4 Original line number Diff line number Diff line package edu.bu.ec504.hw1p1; /** * This is a trivial modification! */ public class MyDistinctCounter extends DistinctCounter { /** Loading @@ -7,7 +10,6 @@ public class MyDistinctCounter extends DistinctCounter { */ public MyDistinctCounter(int memBits) { super(memBits); throw new NotYetImplemented(); // replace this with your code! } /** Loading @@ -15,7 +17,7 @@ public class MyDistinctCounter extends DistinctCounter { */ @Override void saw(String newElement) { throw new NotYetImplemented(); // replace this with your code! mem.set(Math.abs(newElement.hashCode()%(mem.len))); } /** Loading @@ -23,11 +25,10 @@ public class MyDistinctCounter extends DistinctCounter { */ @Override Integer numDistinct() { throw new NotYetImplemented(); // replace this with your code! return mem.bits.cardinality(); } // NESTED CLASSES /** * A runtime exception indicating that a method has not yet been implemented. */ Loading Loading
src/edu/bu/ec504/hw1p1/MyDistinctCounter.java +5 −4 Original line number Diff line number Diff line package edu.bu.ec504.hw1p1; /** * This is a trivial modification! */ public class MyDistinctCounter extends DistinctCounter { /** Loading @@ -7,7 +10,6 @@ public class MyDistinctCounter extends DistinctCounter { */ public MyDistinctCounter(int memBits) { super(memBits); throw new NotYetImplemented(); // replace this with your code! } /** Loading @@ -15,7 +17,7 @@ public class MyDistinctCounter extends DistinctCounter { */ @Override void saw(String newElement) { throw new NotYetImplemented(); // replace this with your code! mem.set(Math.abs(newElement.hashCode()%(mem.len))); } /** Loading @@ -23,11 +25,10 @@ public class MyDistinctCounter extends DistinctCounter { */ @Override Integer numDistinct() { throw new NotYetImplemented(); // replace this with your code! return mem.bits.cardinality(); } // NESTED CLASSES /** * A runtime exception indicating that a method has not yet been implemented. */ Loading