CSSE 220 -- Object-oriented Software Development

Homework 26 Due at 8:05 AM on Day 27

Written problems due at the beginning of your class meeting Day 27.
 

  1. No new reading for Day 27.
  2. Continue thinking about and writing the spell checker program.  Work with your team.  You should have something working to demonstrate in class on Day 28.
  3. If you did not finish your UML diagram and iterative enhancement plan in class, do so before midnight on Day 26.  Commit to your repository
  4. Complete the Markov Team/Partner evaluation on ANGEL (in the Assignments folder).
  5. Do the following written problems.  You can write them by hand, or do them on your computer and  print them out.  Bring a printed copy to the Day 27 class.

1. (15 points) Weiss exercise 6.2. You can just write the code for part (a) out by hand if you wish, but I recommend getting it working in Eclipse and printing out your code.  Here is some code that you can use to test your method if you wish:

public static void main(String[] args) {
  Collection<Collection<String>> a = new ArrayList<Collection<String>>();

  String[][] arrays = {{"abc", "def", "ghi"},
                       {"xyz", "uvw", "abc", "abc"},
                       {"a", "ab", "abc", "xyz", "abc"}};

  for (String[] sArray : arrays){
    Collection<String> a1 = new ArrayList<String>();
    for (String s: sArray)
      a1.add(s);
    a.add(a1);
  }
  System.out.println(count(a, "abc"));
}

2. (5 points) Weiss exercise 6.4.