September 2002
Intermediate to advanced
608 pages
14h 20m
English
As seen in the Team class, we've created a separate Messaging interface to handle the messages we display. Our original application wrote all of its output to the terminal device, so we could do the same with our messages. But with our layered approach, we don't know in the Team class what sort of user interface we're dealing with; it might be graphical, or Web-based, or conceivably even a voice-based or wireless interface. By creating a Messaging interface, we remove any dependence of the Team class on the specifics of the user interface.
Our Messaging interface has only a single method, to show a message (which is a string). You can see the interface in all its radiant glory in Listing 3.9 ...
Read now
Unlock full access