Chapter 5

Contents: True/False | Multiple Choice | Discussion | Programs

True/False

  1. False
  2. True
  3. True
  4. False
  5. True
  6. False
  7. True
  8. False
  9. False
  10. False

Multiple Choice

  1. d
  2. b
  3. d
  4. c
  5. d
  6. d
  7. d
  8. b
  9. a
  10. b

Discussion

  1. Answers here will vary widely. This exercise can be used as a springboard for discussing how the description of an object varies according to the use the object is being put to. Different descriptions will abstract different properties.
  2. Answers can be checked interactively. Some descriptions assume a default orientation (origin in upper left).
    1. A point at coordinates (130,130)
    2. A blue circle with a red outline centered at (30,40) with a radius of 25
    3. A square 20 units on each side centered at (30,30). The inerior is greenish blue and the outline is 3 pixels wide and black.
    4. A veritcal dark red line of length 100, with its bottom at point (100,200) and an arrow pointing up at the upper end.
    5. An unfilled "veritcal" oval with width 10 and height 50 centered at (55, 75)
    6. An orange hourglass with black outline centered at point (5,5). (Note, some platforms may show this a bit differently; try it out!)
    7. The words "Hello World!" centered at (100,100), displayed in an italic courier font with 16 point type.
  3. The program draws a red circle in a default graphics window and then waits for the user to click the mouse 10 times. Each time the user clicks, the circle moves to the point that was clicked. After 10 clicks, the window disappears.

Programming Exercises

Code for Chapter 5 Exercises