Chapter 3 Introduction to Java Applets 141 firstFloorLight (Web hosting company)

Chapter 3 Introduction to Java Applets 141 firstFloorLight : Light : ElevatorModel firstFloor : Floor firstFloorDoor : FloorDoor : ElevatorDoor : ElevatorShaft : Elevator : Bell firstFloorButton: FloorButton : ElevatorButton secondFloor : Floor secondFloorButton : FloorButtonsecondFloorDoor : FloorDoor secondFloorLight : Light Fig. 3.2424 Object diagram of an empty building in our elevator model. Fig. Now we have identified the classes for our system (although we may discover others in later phases of the design process). In Thinking About Objects, Section 4.14, we determine the attributes for each of these classes, and in Thinking About Objects, Section 5.11, we use these attributes to examine how the system changes over time and to introduce its behavioral aspects. As we expand our knowledge, we will discover new information that will enable us to describe our classes more completely. Because the real world is inherently object oriented, it will be quite natural for you to pursue this project, even though you might have just begun your study of object orientation. Questions 1. Why might it be more complicated to implement a three-story (or taller) building? 2. It is common for large buildings to have many elevators. We will see in Chapter 9 that once we have created one elevator object, it is easy to create as many as we like. What problems or opportunities do you foresee in having several elevators, Copyright 1992 2002 by Deitel & Associates, Inc. All Rights Reserved. 7/2/01

Leave a Reply