A complex number has the form a+bi ,can be expressed as the ordered pair of real numbers (a,b).Theclassrepresents the real and imaginary parts as double precision values.Provide a constructor that enables an object of this class to be initialized when it is instantiated. The constructorshould contain default values.Provide Public member functions for each of the following arithmetic’sfunctions (addition –subtraction –multiplication –division), a complex absolute value operation, printing the number in the form (a,b), printing the real part , printing the imaginary part and final overload the == operator to allow comparisons of two complex numbers.Include any additional operations that you think would be useful for a complex number class.Design, implement, and test your class.
A complex number has the form a+bi ,can be expressed as the ordered pair of real numbers (a,b).Theclassrepresents the real and imaginary parts as double precision values.Provide a constructor that enables an object of this class to be initialized when it is instantiated. The constructorshould contain default values.Provide Public member functions for each of the following arithmetic’sfunctions (addition –subtraction –multiplication –division), a complex absolute value operation, printing the number in the form (a,b), printing the real part , printing the imaginary part and final overload the == operator to allow comparisons of two complex numbers.Include any additional operations that you think would be useful for a complex number class.Design, implement, and test your class.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 6 images