Homework 5
CSSE 221 – Fundamentals of Software Development Honors
Fall 2008–2009

Recall the Due Dates and (from the syllabus) the Late (and early) Assignment Policy and guidelines for maintaining Academic Integrity.

Also recall that you can get help on any of these problems during the CSSE lab assistant hours, and you can use the Assignments Discussion Forum on Angel to discuss, clarify, or get help on these problems.

Things to do

  1. Complete the BigRational exercise, if you have not already done so.
  2. Complete the Exceptions exercise, if you have not already done so.
  3. Read Chapter 11, Input/Output and Exception Handling, of Big Java.
  4. Do the written problems below.

Written problems

Write your answers to these questions. Turn your answers in via the appropriate Homework Drop Box on Angel.

  1. (7 points)

    There are 14 Self-Check problems in Chapter 11 (part of your reading for this homework). How many of these 2 Self-Check problems did you read, think about briefly, and check your answer against the answer at the back of the chapter?

  2. (6 points)

    Do the following Review Exercises on pages 522–523 (end of Chapter 11) of Big Java

    1. Exercise R11.8
    2. Exercise R11.10
    3. Exercise R11.12
    4. Exercise R11.19 (this problem counts triple)
  3. (11 points)

    Your next project is BallWorlds -- worlds that contain various kinds of Balls. Examine this screen shot of BallWorlds to see what the finished project looks like.

    UML (Unified Modeling Language) class diagrams are used primarily for two purposes. First, project designers use them during the design phase of larger projects to brainstorm relationships between classes. Second, they can then be used for communication: to convey the design to the implementors of the project. We are using UML for the second purpose in this introduction to the BallWorlds project.

    Examine the UML class diagram for BallWorlds. Focus on the Ball class on the right-hand-side of the diagram, since the subclasses of Ball are the portion of the BallWorlds project that you will implement. (We will supply an implementation of the rest of the project.)

    According to the UML class diagram for BallWorlds:

    1. Ball has 6 subclasses. List them.
    2. Ball implements 3 interfaces. List them.
    3. Ball is an abstract class. What does that mean?
    4. A Dud must implement Drawable. Why?
    5. Judging from their names, what do you think the two Drawable methods should do?
    6. Judging from their names, what do you think the two Relocatable methods should do?
    7. Judging from their names, what do you think the three Animate methods should do?
    8. Every Ball has a ____________ object. (Fill in the blank.)
    9. Every Dud has what, in addition to what it inherits from Ball?
    10. Every DudThatMoves has what, in addition to what it inherits from Dud?
    11. According to the note attached to Ball, what does every Ball have to do?