Question: Write a C++ program that performs binary operations with complex numbers stored in one and two dimensional arrays that you will design as a class.

 Write a C++ program that performs binary operations with complex numbers

Write a C++ program that performs binary operations with complex numbers stored in one and two dimensional arrays that you will design as a class. TO DO LIST Create a base class named with myArray. This class has members following #rows #columns and data which is an object of complex class. Also this class includes a virtual sort function (not pure virtual) that sort complex number objects. Sorting in complex numbers is calculated based on its absolute value. You can find the formula at the end of the file. So you must create a class that represents complex numbers in math at first. It is up to you how to design. However it must cover basic elements and operations. Overload operator +,- ,,>, new function for complex number objects. Derive two subclasses from base myArray class, 1DArray and 2DArray. 10Array must represent one-dimensional arrays, 2DArray must represent two-dimensional arrays. Write default constructor and constructor with parameters for all classes Overload operator +, - .,>, new functions for each subclass of myArray class. Type the definition of sort function in each subclass of myArray class. Write a driver program must include all test list explained in jsut below TO BE TESTED LIST Create objects from all classes in the program by using all constructor types. Show example of all operator (+,-, *,,>, new ) overloading functions in all classes. Apply sort function to the created instances of subclasses (1DArray, 2DArray)

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!