/** * A complex number with a real and imaginary part * * @author Phill Conrad * @author Insert your name here * @author If working in pair, insert 2nd pair here, otherwise delete this line * @version 2014/01/12 for lab02, cs56, W14 */ 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 i 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) */ }