Complex
class, we'll have three constructors:
/** * Initialize to 0.0 + 0.0i */ public Complex() { real_part = 0.0; imaginary_part = 0.0; } // Complex /** * Initialize to x + y*i */ public Complex(double x,double y) { real_part = x; imaginary_part = y; } /** * Initialize to x + 0.0i */ public Complex(double x) { real_part = x; imaginary_part = 0.0; }
new
.
finalize
method with each class.
finalize
, have no parameters,
and be of type void
.
/** * sorts the elements of a subarray * * pre: start ... end indicates a subarray of A * pre: the elements of A are comparable * post: the elements from start to end of A are in order */ public void sort(A,start,end)
/*
and
end with */
javadoc
, that can
build HTML documentation from your Java code, especially if you
follow a particular commenting style.
/** * Here's the comment * * @author Your name * @version 1.0 * ... */
@author
@version
@see
@version
@param
@return
@exception
images
. While I can't find the piece of the
javadoc documentation the specifies where to find those images,
I've placed them in ~rebelsky/pub/javadoc.images
,
and you can create a symbolic link to that directory.
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 Mon Nov 10 08:56:33 1997.
This page generated on Mon Nov 10 10:13:16 1997 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu