Spring 09 CS 229 Project 2 Author: Courtesy of Yanwei Zheng complexx.cpp implements complex as required in complexx.h. When the input format is not the same as described in homework requirements the program may go into infinite loop or simply fail. In addition, when doing calculation of complex numbers, a 0 denominator in division, negative real part in sqrt() will also resulting in error, and the program will exist... *************************************************************** Constructor: complex objects are constructed by given the real and imagine part. If not specified, the constructor will make a complex number whose real and imagine parts are both 0.0. ************************************************************* Constant Functions: double realPart() returns the real part of the complex number. double imagPart() returns the imagine part of the complex number. double magnitude computes the magnitude of the complex number but does not change the complex number. double phase() computes and returns the phase of a complex number. complex sqrt() complex sqrt() returns the square root of a complex number. Complex number with negative real part is not supported as described in homework requirement. complex power() returns a complex number that is the nth power of the original complex number. *************************************************************** Overloaded Operations: +,-,*,/,== addition,subtraction,multiplication,division,and equality of complex numbers. >> << output and input operators of complex numbers. *************************************************************** Other function: complex f() computes the polynomial f(z) = z^3 - 3 z^2 + 4 z - 2.