Loading src/edu/bu/ec504/hw1p1/MyDistinctCounter.java +3 −4 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ public class MyDistinctCounter extends DistinctCounter { */ public MyDistinctCounter(int memBits) { super(memBits); throw new NotYetImplemented(); // replace this with your code! } /** Loading @@ -15,15 +14,15 @@ 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))); } /** * @inheritDoc */ @Override Integer numDistinct() { // replace this with your code! return 0; Integer numDistinct() { return mem.bits.cardinality(); } // NESTED CLASSES Loading Loading
src/edu/bu/ec504/hw1p1/MyDistinctCounter.java +3 −4 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ public class MyDistinctCounter extends DistinctCounter { */ public MyDistinctCounter(int memBits) { super(memBits); throw new NotYetImplemented(); // replace this with your code! } /** Loading @@ -15,15 +14,15 @@ 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))); } /** * @inheritDoc */ @Override Integer numDistinct() { // replace this with your code! return 0; Integer numDistinct() { return mem.bits.cardinality(); } // NESTED CLASSES Loading