Suppose that we need to build up a software for playing a music from a CD-ROM Drive. A visual programming language might be used (VisualBasic or Delphi for example). If language supports multimedia controls, than we can use its components an reprogramm them if necessary, or we can programm new components. One possible graphical design for our player might be:
As you can see this UML Music Player needs these controls:
![]() |
play |
![]() |
stop |
![]() |
eject |
![]() |
pause |
![]() |
fast forward |
![]() |
rewind |
![]() |
power |
These controls will be realized by buttons, thus we'll have a button performing these controls. If we look at buttons as separete components, we can draw out a component UML diagram. This is shown on the following picture:
The component diagram for the MusicPlayer. |
All the components shown on the previous diagram belongs to one global component - Button, but actions they perform are diferent. We must obtain these actions by programming them.