Global Positioning System Reference
In-Depth Information
Figure1.1. The programming
environment can be compared
to a programmable universal
remote control.
1.2
Controlling Remote Objects via References
Object orientation has been an evolving principle in software development
for more than three decades. Java, developed by James Gosling and re-
leased in 1995, derives much of its it syntax from C and C++, but has
a simpler object model. Java was originally developed as a language to
control devices|not primarily computers. This initial intention can help
us to understand the entity of \objects" by drawing the analogy between
software objects and hardware devices.
A television set is a sophisticated technical device and its \users" don't
care much about internal functionalities. Its primary functions are ab-
stracted with the buttons of the remote control. The haptic remote control
(HMI) serves as the human-machine interface, similar to a graphical user
interface (GUI) on a computer screen. The buttons of the remote define a
set of commands (API) and variables to control the device:
ˆ one button to wake up the television and turn it on and off
booleanon/off ;
ˆ one element to switch channels (controlling the receiver component)
integer1-50 ;
ˆ one element to control the sound (amplifier and speakers)
integer0-100(%) ;
ˆ two elements to control the brightness and color (display)
integer0-100(%) .
From a programmer's point of view, the remote control is the program-
ming environment and the TV set is the controlled object. The program
has a reference to the TV realized by wireless transmission. Many tele-
visions are controllable only via remote control and without it you loose
the reference to the object television|the TV would go into the \garbage
collection"! An object is useless, if it can't be referenced.
 
Search WWH ::




Custom Search