February 2014
Beginner
1248 pages
62h 25m
English
Figure 5.10 shows the UML activity diagram for the general switch statement. Most switch statements use a break in each case to terminate the switch statement after processing the case. Figure 5.10 emphasizes this by including break statements in the activity diagram. The diagram makes it clear that the break statement at the end of a case causes control to exit the switch statement immediately.
Fig. 5.10 | switch multiple-selection statement UML activity diagram with break statements.
The break statement is not required for the switch’s last case (or the optional default case, when it appears last), because ...
Read now
Unlock full access