January 2014
Intermediate to advanced
736 pages
70h 43m
English
Class Time2Test (Fig. F.6) invokes the overloaded Time2 constructors (lines 8–12 and 40). Line 8 invokes the no-argument constructor (Fig. F.5, lines 12–15). Lines 9–13 of the program demonstrate passing arguments to the other Time2 constructors. Line 9 invokes the single-argument constructor that receives an int at lines 18–21 of Fig. F.5. Line 10 invokes the two-argument constructor at lines 24–27 of Fig. F.5. Line 11 invokes the three-argument constructor at lines 30–33 of Fig. F.5. Line 12 invokes the single-argument constructor that takes a Time2 at lines 36–40 of Fig. F.5. Next, the application displays the String representations of each Time2 object to confirm that it was initialized properly. ...
Read now
Unlock full access