257 - aHW2
  1. (15 pts) Chapter 6, Re-write code provided in p.190 Fig 6-2
    1. Place all code into the main. There should be ONLY ONE METHOD in your client when you are done.
    2. To remove all references to BufferedReader & FileReader.

    3. To use only System.out.printf for output. Doing so in the appropriate ways.
      With respect to printing, from now on, whether I remember to specify this or not, you should always do it anyway!
    4. Use try/catch only where necessary to get around a checked exception.
    5. To remove break; statment and use a non-trivial boolean expression in while
    6. **INSTEAD** of ΑrrayList, put all lines into a Stack using push(). In the loop which prints, use pop().
      (NOTE: Output of your code should be EXACTLY the same as ReverseFile.java when each is given the same input file)

  2. (15 pts) Chapter 6, Write a client which counts the number of unique words in a file and print out the entire set. The name of the file should be obtained from the user. The counting should be NOT be case-sensitive. A word is a span of contiguous characters which do not contain any whitespace.
    Example: given the file wordy.txt, your program should report there are 3 unique words which are: { cat rat chihuahua }
    1. Do not use any array. Do not use any ΑrrayList.

  3. (20 pts) Chapter 6, Exercise 8 with the following additional instructions.
    1. Do not use any array. Do not use any ΑrrayList.

  4. (40 pts) Exercises 3 & 4 of Chapter 7 found on p.273 and a Client
    where the Client will demonstrate the functionality of your Date257 class by putting a number of Date257 objects into a Queue.

    To do this write a Date257Queue class that implements the parameterized Queue interface
    in a manner somewhat similar to that found on p.283, Figure 8-1. Be sure your class has a variadic parameter method or constructor and that your client uses it.

    Because Java already has a class named Date (in java.util), the name of your class should be Date257.

    For this Date257 problem, you will write the following classes:

    1. Date257
    2. Date257Queue
    3. QueueClient

     

  1. (10 pts) Submission Checklist
    Follow instructions for HW0 but using the correct number when naming your tar file

    hw2-ldale.tar

    and on the subject line of your email.

    Subject: 257 - hw2