Problem 1 --------- public static String pickOne(String a, String b, String c) { Random rng = new Random(); int which = rng.nextInt(3); if (which == 0) { return a; } else { if (which == 1) { return b; } else { return c; } } } Problem 2 --------- a) The mystery method takes a String containing a filename as its input. If a file with that name exists, the method skips over any integers in the file and returns the first "token" that follows them. If the file doesn't exist it returns null. A good name might be "skipInts". b) We need to test both branches of the IF statement, as well as zero, one, and many iterations of the loop. We could accomplish that by passing in: A name that doesn't correspond to a file: Tests the else Name of a file containing "test data": Runs the loop zero times Name of a file containing "234 test": Runs the loop once Name of a file containing "234 5 87 test" Runs the loop multiple times Problem 3 --------- a) The values in the array must be ordered from smallest to largest. b) Final means the variable cannot be changed after it's initialized. c) Static means the variable or method is associated with the class as a whole. There's only *one* copy, rather than one for each instance. d) The main method is where execution starts when running a stand-alone program. Because it's static, it can be called before any objects are created. Problem 4 --------- a) public void addCircle(Circle c) { circles.add(c); } b) public void drawAllCircles() { for(Circle c : circles) { c.makeVisible(); } } c) public boolean contains(Circle key) { for(Circle c : circles) { if (c.equals(key)) { return true; } } return false; } Problem 5 --------- public int findSmallest(int[] nums, int start) { int idxOfSmallest = start; for(int i=start+1; i