I would agree with this. It doesn't make sense to iterate through a list of Job objects and then not do anything with them.Originally posted by Layne Lund:
Perhaps you mean to do "aJob.print()" instead of "waitingList.print()"?
Originally posted by Paul Clapham:
I would agree with this. It doesn't make sense to iterate through a list of Job objects and then not do anything with them.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Originally posted by Garrett Rowe:
If you want the toString() method in Job to return somthing useful, you are going to have to override the toString() method in Object class and define what "somthing useful" is.
For instance:
"I'm not back." - Bill Harding, Twister
Originally posted by Layne Lund:
Umm...that's the code for the Student class...[/QB]
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Originally posted by Garrett Rowe:
I know... I was just attempting to show how a meaningful toString() method might look. I was gonna let the OP figure out the toString() method for their class themselves.
Originally posted by Layne Lund:
Thank you.
now I just have to get the date added to the output, I have been told to use numCopies * pages * 2 (if DoubleSided).
the question is how do I use the above within the printReport method.
Doh! I missed the "for instance" just above that code. Sorry about that.
The Job class already has a method that does this. It just isn't called toString().
Layne
[ January 24, 2006: Message edited by: Layne Lund ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |