I have been given a question about a object creation resulting in the constructor of the Time class being called, and to write the constructor's header
new Time(21, 39, 55);
So, would the header be "public Time(21, 39, 55)" ? and i have to give meaningful names to formal parameters, which is what i don't understand. Is it just private int hours; etc? I have also been told to attempt to write the body of the constructor and will need to estimate how the code in the body will work and to invent some fields.
Help on this would be appreciated
No comments:
Post a Comment