/** * A complex number with a real and imaginary part * * @author Phill Conrad, and (insert your name here) * @version lab02 for CS56, Winter 2012 */ public class Complex { private double real; private double imag; /** * noarg Constructor for objects of class Complex */ /** * Two-arg Constructor for objects of class Complex * @param realPart real part * @param imagPart imaginary part */ /** * set the real part * * @param r the new real part */ /** * set the imaginary part * * @param r the new imaginary part */ /** * get the real part * * @return real part */ /** * get the imaginary part * * @return imaginary part */ /** format Complex number as String, in an expression like: * 2.0 + 3.0i, 2.5 + 0.0i, 0.0 + 0.0i, or -3.33 + -1.5i * * @return formatted complex number (e.g. 2.0 + 3.0i) */ }