Question: Please help using C++ Thank you. Create a class Complex having two private data members real and imag of type double. The declaration of your

Please help using C++ Thank you.
 Please help using C++ Thank you. Create a class Complex having

Create a class Complex having two private data members real and imag of type double. The declaration of your class (.h file) should include into the public section the prototypes of two constructors (default non- parameterized and constructor initializer), as well as the following member functions getReal, getlmag, setReal, setlmag, addComplex, subtractComplex, multiplyComplex and print. The last one displays the values stored into the private data members Additional Requirements: Use minimum number of formal parameters. For the definition of the constructor initializer use the initialization. For the definitions of addComplex, subtractComplex and multiplyComplex use pointer this. 1. 2. 3. 4. Draw UML diagram. Write a driver (.cpp) program to test all of the above functions. Submit printout of your source code and your outputs. UML Diagram NOTE: You should create three separate files (.h file for class declaration; cpp file for member function definitions and .cpp file for driver program)

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!