January 2014
Intermediate to advanced
736 pages
70h 43m
English
In this section, you’ll create a new class, then use it to create an object. We begin by delcaring classes GradeBook (Fig. B.1) and GradeBookTest (Fig. B.2). Class GradeBook (declared in the file GradeBook.java) will be used to display a message on the screen (Fig. B.2) welcoming the instructor to the grade book application. Class GradeBookTest (declared in the file GradeBookTest.java) is an application class in which the main method will create and use an object of class GradeBook. Each class declaration that begins with keyword public must be stored in a file having the same name as the class and ending with the .java file-name extension. Thus, classes GradeBook and ...
Read now
Unlock full access