6.1. Introduction

In this chapter, we introduce Visual Basic's remaining control statements. We continue our early emphasis on object-oriented programming, presenting the next version of our GradeBook class. We demonstrate the For...Next, Select...Case, Do...Loop While and Do...Loop Until control statements. Through a series of short examples using While...End While and For...Next, we explore the essentials of counter-controlled repetition. We create a GradeBook class that uses a Select...Case multiple-selection statement to count the number of A, B, C, D and F grades in a set of letter grades entered by the user. We introduce the Exit and Continue program control statements. Finally, we discuss the logical operators, which enable you to use ...

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.