CIS 163 AA - Java Programming I - Section 5811
Worksheet #3
Due Monday, October 3, 2005

Name:

I. Definitions: please explain the following terms:

  1. parameter

  2. dot operator

  3. alias

  4. legacy system

  5. Autoboxing

  6. component

  7. label

  8. layout manager

II. Question or short essay

  1. What happens when Java performs automatic garbage collection?

  2. What does the String method toLowerCase() do?

  3. What is the purpose of the Java swing class?

  4. What is the purpose of the setPreferredSize() method of a panel?

  5. What is the purpose of the add() method of a container?

  6. What is the purpose of the pack() method of a frame?

  7. How do you format a decimal value to 2 decimal places when you print it?
III. Programming Exercises Write source code for the following:

    Modify the LabelDemo program on page 149 so that it displays a fourth label, with the text of the label centered above the image.