Problem:
Create a class ComplexNumber that includes two data members:
• Double realPart
• Double imaginaryPart
The class member functions:
- A set and a get declaration/definition for each of the data members of the class complexNumber.
- A print function that prints the date in the following format of complex numbers such as: a + bi, a – bi
- Parameterized Constructor ComplexNumber (double r, double i)
Required:
Question: Define the 3 objects from class complexNumber, and initialize its values and print the information of the three objects by the member function print.
Please show how the 3 objects from class complexNumber are created in the program.