Question: Coding exercise 1. Create a class called complexNumber that stores a complex number of the form a+bi, where i is 1. a is the real

Coding exercise 1. Create a class called complexNumber that stores a complex number of the form a+bi, where i is 1. a is the real and b is the imaginary part of the number1 . You should be able to get the real and imaginary parts of the number. a and b can be negative, e.g., 3+4i, -3+4i, 3-4i, and -3-4i. 2. Implement the ability to add, subtract, and multiply two complexNumber objects and save the result in another complexNumber object by overloading operators +, -, and *. 3. Overload the operators >> and

Coding exercise 1. Create a class called complexNumber that stores a complex

Create a driver program that tests all the functionality in the 6 points above. Make sure to test for edge cases. Note that the complexNumber type should only read/write a single complex number from/to a stream. The following function may be helpful to you in your driver program:

void performComplexOperation(istream &fin, ostream &fout){ complex c1(0,0), c2(0,0), cres(0,0); char op = '

complexinput Notepad File Edit Format View Help (3+4i) (5-61) (3-41(2-91)(7-14i) - (0+14i)(+2-4i) / (-1+i) complexinputWrong - Notepad File Edit Format View Help (3+4i) - dummy complexOutput Notepad File Edit Format View Help (39+21) (5-131) (7+01)(-3+i)

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!