Lab8: Week of Feb 23-Mar 01
 


Define a class called Complex which defines complex numbers and how they
behave. A complex number a+ib has two real attributes a and b.

It should have a constructor Complex(double n, double m) which
initializes the number to n+im.

Write methods with the following specifications:

Complex add(Complex f1) - add Complex f1 to the Complex object on which
it is called.
Complex subtract(Complex f1) - similar to add
Complex multiply(Complex f1) - similar to add
Complex divide(Complex f1) - similar to add
double absolute(Complex f1) - finds absolute value
double angle(Complex f1) - gives angle
Complex reciprocal(Complex f1) - gives reciprocal
Complex conjugate(Complex f1) - gives conjugate
Complex power(Complex f1) - similar to add

Define and use helper functions as you need.

Look at:
http://www.clarku.edu/~djoyce/complex/
http://mathworld.wolfram.com/ComplexNumber.html
You can google on Complex numbers