Question: 1. Write a C++ program to find the median element in an array of complex numbers in terms of their magnitudes. Note that the magnitude

1. Write a C++ program to find the median element in an array of complex numbers in terms of their magnitudes. Note that the magnitude of a complex number (a +jb) is represented by the distance from the origin in an Argand diagram (http://mathworld.wolfram.com/ArgandDiagram html) Define a class of complex number with the following attributes, and define whatever public member functions you feel appropriate. class complex number \ private double re, img public: // Define whatever member functions you feel appropriate Try to assign the following 7 complex numbers into an array, say A[7], using some member function of the class of"complex_number" *Apply your program to produce the following outcome on the computer screen. Original Array of Complex Numbers The Median Element of the Array is: 5+j5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
