Your interfaces were significantly less good than I would have hoped. Here are some of the problems that you may want to correct before beginning the next assignment.
int
, boolean
, and
double
. Unfortunately, Java passes primitive types
by value rather than by reference. This means
that changes to parameters within methods are not reflected
outside the method.
String
or Boolean
, as Java disallows
modifications to the values of such objects (note that there
is no String.setValue()
method, or anything similar).
readXXX()
methods, rather than passing
a buffer into those methods.
open()
and close()
methods.
If no such methods are available, how does a programmer differentiate
between appending to a file and rewriting the file? If no such
methods are available, how does a programmer differentiate between
reading the next element of a file, and rereading the first element
of a file?
javadoc
documentation.
Try to have at least a sentence on each method.
File
parameter to all of
your methods. In order to use standard input or standard output,
the programmer had to rely on STDIN
or STDOUT
constants. Rather than having such STDOUT
constants,
why not provide a separate version of your functions with one less parameter?
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Fri Oct 3 08:33:22 1997.
This page generated on Fri Dec 12 12:06:13 1997 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu