created: 03/15/98; revised: 08/18/03

CHAPTER 38 — More Applet Examples

This chapter continues the example of the previous chapter.

Chapter Topics:

The paint() method at the end of the last chapter is too complicated. This is sometimes a sign that a new class is needed to manage the complication. This chapter designs a Circle class to contain the complications of drawing circles.

QUESTION 1:

Objects have both state (data) and behavior (methods.) In general, what should be the state and behavior of Circle objects?