Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++. Design a class that represents complex numbers called ComplexNumber. Complex numbers have both a real and an imaginary part and are expressed in rectangular
C++. Design a class that represents complex numbers called ComplexNumber. Complex numbers have both a real and an imaginary part and are expressed in rectangular form as Complex Number = Real Part+j Virtual Part. 1) We should be able to do the following operations with two objects belonging to the ComplexNumber class complex_result = complexl+complex2; complex_result = complexl-complex2; complex_result = complex1*complex2; complex_result = complexl/complex2. 2) We should be able to calculate the polar form of the ComplexNumber object with the convertToPolarForm() membership function. There is amplitude (r) and phase (0) information of this complex number in polar form. Im y 2 = x + iy 0 RE X There is a display() membership function that prints information about the object of the ComplexNumber class. This function should print both the polar representation and the rectangular representation of the object belonging to the ComplexNumber class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started