Question: IN C++ In lecture we went over the Rat class. Here the question is to write a Complex ( imaginary number ) class; using namespace

IN C++

In lecture we went over the Rat class. Here the question is to write a Complex ( imaginary number ) class;

using namespace std;

class Complex { private:

double r;

double i;

public:

Complex();

overloaded add function for Complex should return Complex

overloaded subtract function for Complex should return Complex

overloaded multiply function for Complex should return Complex

overloaded divide function for Complex should return Complex

get and set for both r and i

overloaded input and output functions for Complex };

for the definitions of the arithmetic functions see here:

http://en.wikipedia.org/wiki/Complex_number#Addition_and_subtractio

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!