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.

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. 1DArray 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) Assignment Rules: You are not allowed to use any functions from math library excluding calculation of absolute value Pay attention to programming conventions such as indentation, comment lines etc. which might affect your grades. Cheating and similarity in assignments will not be tolerated. Always try to do yourself and ask TAs when you have questions. Send your all of project file in a compressed folder via CATS system having it in the following format (e.g. stdNumber_NameSurname.rar)

image text in transcribedimage text in transcribedimage text in transcribed

CSE3003 OBJECT ORIENTED PROGRAMMING 2020-2021 FALL HOMEWORK#2 DEADLINE: 04 January 2021 until 11:55 pm! 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. 1DArray 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 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) Assignment Rules: . You are not allowed to use any functions from math library excluding calculation of absolute value Pay attention to programming conventions such as indentation, comment lines etc. which might affect your grades. Cheating and similarity in assignments will not be tolerated. Always try to do yourself and ask TAs when you have questions. Send your all of project file in a compressed folder via CATS system having it in the following format (e.g. stdNumber_Name Surname.rar) Absolute Value of a Complex Number The absolute value of a complex number, a +bi (also called the modulus ) is defined as the distance between the origin (0,0) and the point (a, b) in the complex plane. |a +bil= Va2 + B2 CSE3003 OBJECT ORIENTED PROGRAMMING 2020-2021 FALL HOMEWORK#2 DEADLINE: 04 January 2021 until 11:55 pm! 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. 1DArray 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 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) Assignment Rules: . You are not allowed to use any functions from math library excluding calculation of absolute value Pay attention to programming conventions such as indentation, comment lines etc. which might affect your grades. Cheating and similarity in assignments will not be tolerated. Always try to do yourself and ask TAs when you have questions. Send your all of project file in a compressed folder via CATS system having it in the following format (e.g. stdNumber_Name Surname.rar) Absolute Value of a Complex Number The absolute value of a complex number, a +bi (also called the modulus ) is defined as the distance between the origin (0,0) and the point (a, b) in the complex plane. |a +bil= Va2 + B2

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

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions