6.5. GradeBook Case Study: Select...Case Multiple-Selection Statement
Chapter 5 presented the If...Then single-selection statement and the If...Then...Else double-selection statement. Occasionally, an algorithm contains a series of decisions that test a variable or expression separately for each value that the variable or expression might assume. The algorithm then takes different actions based on those values. Visual Basic provides the Select...Case multiple-selection statement to handle such decision making.
GradeBook Class with Select...Case Statement to Count A, B, C, D and F Grades.
Figure 6.9 contains an enhanced version of the GradeBook class introduced in Chapter 4 and further developed in Chapter 5. The new version not only calculates ...
Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.