Java Reference
In-Depth Information
9. For the Select Case structure, use the following conventions:
a. Begin the structure with Select Case, followed by the variable to be tested.
b. Use End Case as the structure terminator.
c. Align Select Case and End Case vertically.
d. Indent each alternative.
e. Begin each alternative with Case, followed by the value of the variable that equates to the
alternative.
f. Indent the action of each alternative.
These conventions are illustrated in Figure A-17. (Java implements the structure in code with the
keyword, switch.)
Select Case CustomerCode
Case 100
HighRiskCustomerCount = HighRiskCustomerCount + 1
Case 200
LowRiskCustomerCount = LowRiskCustomerCount + 1
Case 300
RegularCustomerCount = RegularCustomerCount + 1
Case 400
SpecialCustomerCount = SpecialCustomerCount + 1
End Case
FIGURE A-17
For an additional example of pseudocode, see Figure 1-15 in Chapter 1 on page 19.
The Unified Modeling Language (UML)
Just as flowcharts describe algorithms, object-oriented design (OOD) has a standard method to depict,
or diagram, concepts for design purposes. The Unified Modeling Language (UML) is a notation used
to describe object behaviors and interaction. The UML is a graphical language used to represent how a
system behaves or should behave. The UML is a relatively new language, having been developed in the
1990s from a number of competing object-oriented design tools.
Search WWH ::




Custom Search