O'Reilly logo

Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition by Harvey M. Deitel - Deitel & Associates, Inc., Paul J. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required