We begin with an example that consists of classes
GradeBook (Fig. 4.1) and
GradeBook-Test (Fig. 4.2). Class
GradeBook (declared in file
GradeBook.cs) will be used to display a message on the screen (Fig. 4.2) welcoming the instructor to the grade-book app. Class
GradeBookTest (declared in the file
GradeBookTest.cs) is a testing class in which the
Main method will create and use an object of class
GradeBook. By convention, we declare classes
GradeBookTest in separate files, such that each file’s name matches the name of the class it contains.
1 // Fig. 4.1: GradeBook.cs 2 // Class declaration with one method. 3 using ...