Loading src/edu/bu/ec504/hw1p1/Main.java +5 −2 Original line number Diff line number Diff line Loading @@ -6,11 +6,12 @@ import java.util.ArrayList; import java.util.Arrays; public class Main { // constants static final int stateSize = 10; // the number of bytes in the myDistinctCounter object static void test(ArrayList<String> testStrings) { // Show the counter my test strings myDistinctCounter tester = new myDistinctCounter(10); myDistinctCounter tester = new myDistinctCounter(stateSize); for (String test: testStrings) { tester.saw(test); } Loading @@ -29,11 +30,13 @@ public class Main { /** * Runs a simple test, based on the example in the homework description. */ System.out.println("Simple test:"); test(new ArrayList<>(List.of("Bravo", "Alfa", "Charlie", "Kilo", "Charlie", "Alfa", "Bravo"))); /** * A more complicated test. */ System.out.println("\n\n\nLonger test:"); final BigInteger two = new BigInteger("2"); BigInteger base = two; BigInteger modulus = new BigInteger("1911337"); // 10007 * 191 Loading Loading
src/edu/bu/ec504/hw1p1/Main.java +5 −2 Original line number Diff line number Diff line Loading @@ -6,11 +6,12 @@ import java.util.ArrayList; import java.util.Arrays; public class Main { // constants static final int stateSize = 10; // the number of bytes in the myDistinctCounter object static void test(ArrayList<String> testStrings) { // Show the counter my test strings myDistinctCounter tester = new myDistinctCounter(10); myDistinctCounter tester = new myDistinctCounter(stateSize); for (String test: testStrings) { tester.saw(test); } Loading @@ -29,11 +30,13 @@ public class Main { /** * Runs a simple test, based on the example in the homework description. */ System.out.println("Simple test:"); test(new ArrayList<>(List.of("Bravo", "Alfa", "Charlie", "Kilo", "Charlie", "Alfa", "Bravo"))); /** * A more complicated test. */ System.out.println("\n\n\nLonger test:"); final BigInteger two = new BigInteger("2"); BigInteger base = two; BigInteger modulus = new BigInteger("1911337"); // 10007 * 191 Loading