CIT 594 Third Quiz
Spring 2002, Dave Matuszek
Name __________________________________________
  1. (5 points) What does the acronym DRY stand for? (Three words)

  2. (15 points) What three things characterize a data type?

  3. (5 points) What one characteristic of a data type should not be specified in an ADT?

  4. (5 points) Very briefly, tell what it means for a class to be cohesive.

  5. (5 points) Very briefly, tell what it means for classes to be loosely coupled.

  6. (10 points) Write the complete Java code for a setter for a double variable named debt.

  7. (10 points) (Complete the sentences) For an ADT,
    1. The constructors and transformers must together be able to

    2. The accessors must be able to

  8. (10 points) Name the two kinds of transformers, and briefly tell which is which.

  9. (10 points) Write a complete main method (and nothing more) for a class Opus, so that "static poisoning" will not occur. Assume the existence of any other methods you need.

  10. (25 points) Write the signatures (complete headers) for the five main methods of the java.util.Stack class. Do not explain these methods.