CIS 163 AA - Java Programming I - Section 5811
Quiz #1
Due Monday, September 26, 2005

Name:

I. Definitions: please explain the following terms:

  1. increment

  2. AWT

  3. instance

  4. package

  5. constructor

  6. Math method pow(x.y)

  7. variable

  8. wrapper class

  9. container

  10. NumberFormat class

II. Question or short essay

  1. What is the reason for using a semicolon (;) in a java program?

  2. In graphics programming what purpose does the setColor method have?

  3. How is a method different from a class?

  4. How could you get a random integer somewhere from 1 to 6?

  5. What is the difference between a frame and a panel?
III. Programming Exercises Write source code for the following:
  1. Write a program to read in the weight (in pounds) of an object and compute and print the weight in kilograms with two decimal places. (Hint: 1 pound is equal to 0.453592 kilogram)
  2. Write an applet that draws a smiling face. Give the face eyes with pupils, ears, a nose and a mouth.