( --> )

Sample Programming Challenge

Title

Objectives

  1. To engage you in array processing.
  2. To engage you in String processing.
  3. To engage you in an analogical thought process.
  4. To reinforce the practice of writing and testing
    library classes.

Part 1

  1. By analogy with the BagOfInts.java example, write
    a BagOfWords class.
  2. By analogy with the BagOfIntsTester.java example,
    write a test program to test all of the
    functionality in your BagOfWords class.

Part 2

  1. By analogy with the BagOfInts.java example, write
    a OrderedBagOfWords class.
  2. By analogy with the OrderedBagOfIntsTester.java
    example, write a test program to test all of the
    functionality in your BagOfWords class.

Part 3

  1. By analogy with the BagOfInts.java example, write a
    SetOfWords class.
  2. By analogy with the SetOfIntsTester.java example,
    write a test program to test all of the
    functionality in your BagOfWords class.

Part 4

  1. By analogy with the SetOfInts.java example, write
    a OrderedSetOfWords class.
  2. By analogy with the BagOfIntsTester.java example,
    write a test program to test all of the
    functionality in your OrderedSetOfWords class.