Programming Practice
Deitel and Deital, 4th edition, Chapter 18

18.9 Consider class Complex as shown below. The class enables operations on so-called complex numbers.

   

    There are realPart + imaginaryPart * i, where i has the value of (-1)1/2.

a) Modify the class to enable input and output of complex numbers through the overloaded >> and << operators, respectively. (Your should remove print function from the class).

b) Overload the addition, subtraction, multiplication, and division operators of two complex numbers as in algebra.

c) Overload the == and != operators to allow comparisons of complex numbers.