Java Reference
In-Depth Information
CHALLENGE 7.1
The class structure shown in Figure 7.1 has at least ten questionable assignments of
responsibility. Circle as many problems as you can find; for four of these points,
write a statement of what is wrong.
Figure 7.1. What's wrong with this picture?
Looking at all the oddities in Figure 7.1 may loosen up your thinking about appropriate object
modeling. This is a good frame of mind to be in when you set out to define terms, such as
class. The value of defining terms increases as it helps people communicate and decreases as
it becomes a goal in itself and a source of conflict. In this spirit, take the following difficult
challenge.
CHALLENGE 7.2
Define the qualities of an effective, useful class.
Search WWH ::




Custom Search