Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions