Question: CSC421 Assignment1 Student Name: Student ID: Overload the operators +.-, Read the program carefully to understand what the program does. Compile, debug and test the

 CSC421 Assignment1 Student Name: Student ID: Overload the operators +.-, Read

CSC421 Assignment1 Student Name: Student ID: Overload the operators +.-, Read the program carefully to understand what the program does. Compile, debug and test the program using the following command lines: and the friend ostream operator Jassignment1 center /l assignmentl cpp # include #include #include using namespace std; class Complex float re; float im; l complex number class ll real part // imagination part public: Complex(float r-0.0, float i-0.0)fre-r, im-i;) Complex(const Complex& c)fre c.re; im"c.im:) void operator (const Complex& c)fre-c.re; im-c.im;) assignment Complex operator-Oconst (return Complex-re, -im)) / unary negation Complex operator +(const Complex&) const Complex operator -(const Complex&) const; Complex operator (const Complex&) const; Complex operator (const Complex&const; friend ostream& operator

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!