a) Modify the class to enable input and output of complex number via overloaded >> and << operators, respectively(you should remove the print function from the class).
b)Overload the multiplication operator to enable multiplication of two complex numbers as in algebra.
//Fig. 11.20 : Complex.h
//Complex class definition.
#ifndef COMPLEX_H
#define COMPLEX_H
class Complex
{
public:
Complex(double = 0.0, double = 0.0); // constructor
Complex operator+( const Complex &) const; // adition
Complex operator-( const Complex &) const; // substraction
void print() const; // output
private:
double real; // real part
double imaginary; // imaginary part
}; // end class Complex
// display a Complex object in the form: (a,b)
void Complex::print() const
{
cout << '(' << real << ", " << imaginary <<')';
} // end function
*********************************************************************************************************
// Fig. 11.22:fig11_22.cpp
// Complex class test program.
#include<iostream>
#include"Complex.h"
using namespace std;