Question: I need this in C++ please: Create a class called Complex for performing arithmetic with complex numbers. Write a program to test your class. Complex

I need this in C++ please:

Create a class called Complex for performing arithmetic with complex numbers. Write a program to test your class. Complex numbers have the form a+ ib

realPart + i* imaginaryPart

where i =I need this in C++ please: Create a class called Complex for1

Use double variable to represent the private data of the class. Provide a constructor that enables an object of this class to be initialized when it declared. Default and overloaded constructor should be provided. Provide public member functions to provide the following operations on complex numbers:

a) add - add the real parts together and the imaginary parts together

b) subtract - subtract real and subtract imaginary

c) toString - return string representing complex number in the form (a,b) where a is the real part and b is the imaginary part.

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!