Commit 60c22955 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Minor edits

parent 3a78d8d1
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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);
        }
@@ -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