February 2014
Beginner
1248 pages
62h 25m
English
Class EmployeeTest (Fig. 8.9) creates two Date objects to represent an Employee’s birthday and hire date, respectively. Line 10 creates an Employee and initializes its instance variables by passing to the constructor two Strings (representing the Employee’s first and last names) and two Date objects (representing the birthday and hire date). Line 12 implicitly invokes the Employee’s toString method to display the values of its instance variables and demonstrate that the object was initialized properly.
Read now
Unlock full access