Java Reference
In-Depth Information
external trigger
USER CLICKS BUTTON
Computer senses click
Print button briefly
depresses
operations
cause nothing
else to happen
Mouse pointer
changes to
an hourglass
event
operation triggers
another event
Print request sent
to printer driver
File begins to print
Print icon
displays in taskbar
Printer returns
completion message
Print complete
Print icon no
longer displays
Mouse pointer
displays as an arrow
FIGURE 1-20
As shown in Figure 1-20, nothing happens unless the trigger sends a message
and causes the event to occur. At the conclusion of the operation, the system
again will do nothing until another trigger causes an event to occur. This rela-
tionship between events and operations is a key feature of object-oriented
programming, and programs that are constructed in this way are said to be
event-driven .
Event diagrams and class diagrams are part of the Unified Modeling
Language ( UML ), which provides a standardized model for object-oriented
design to depict or describe concepts graphically. The UML is a system of sym-
bols used to describe object behaviors and interaction and to represent how a
system should behave. The UML is a relatively new language tool, having been
developed in the 1990s from a number of object-oriented design tools. Appendix
A includes an introduction to the use of the UML.
ADJECTIVES In object-oriented terminology, the characteristics of an object
are defined by its attributes, or properties. Recall that attributes of an object are
values that determine the properties of an individual object, such as its name,
size, or background color. Think of attributes as adjectives that describe an
object. The attributes of a hyperlink on a Web page might include the font, the
color, the font size, and the URL to which it links. Attributes of a bank account
object might include a balance and an account number; if the object were an air-
line flight, the number of passengers would be an attribute. An attribute should
not be confused with the data or value assigned to the attribute. Color, for
example, is an attribute, while red is the data or value.
 
Search WWH ::




Custom Search