Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Original Assignment: Being executed on Xcode for Mac. Complex Numbers sheets: This is the code I received from another Chegg Response. This code has a
Original Assignment: Being executed on Xcode for Mac.
Complex Numbers sheets:
This is the code I received from another Chegg Response. This code has a few errors listed further below:
At the beginning after "int main()," I added:
cout
cout
HWH8 Complex number class For HW 8 you will build a class which supports complex number arithmetic. The mathematical algorithms for handling complex numbers in math and engineering are in the accompanying files. For your program you must create a class to implement overloaded mathematical operators for complex numbers. The following class structure is derived from exercise 11.8 on page 495 of the text The text exercise also gives source code for overloading the and operators. These can serve as skeletons for developing the other overloaded functions. Other viable overloading functions are acceptable and bonus points will be awarded for the best design. As always, you must write formatting commands to output your data to match the submission format document. Note the format for outputting the complex numbers with the j prefix and the placement of negative signs, as well as, the column alignment of the initial values, floating point precision, and the spacing of the final line. This is a 20-point homework and there are many details. Your program must overload the assignment operator and 5 arithmetic operators The "ll" operator is to be overloaded to perform parallel addition as described in the "More about Complex Numbers" file. HWH8 Complex number class For HW 8 you will build a class which supports complex number arithmetic. The mathematical algorithms for handling complex numbers in math and engineering are in the accompanying files. For your program you must create a class to implement overloaded mathematical operators for complex numbers. The following class structure is derived from exercise 11.8 on page 495 of the text The text exercise also gives source code for overloading the and operators. These can serve as skeletons for developing the other overloaded functions. Other viable overloading functions are acceptable and bonus points will be awarded for the best design. As always, you must write formatting commands to output your data to match the submission format document. Note the format for outputting the complex numbers with the j prefix and the placement of negative signs, as well as, the column alignment of the initial values, floating point precision, and the spacing of the final line. This is a 20-point homework and there are many details. Your program must overload the assignment operator and 5 arithmetic operators The "ll" operator is to be overloaded to perform parallel addition as described in the "More about Complex Numbers" file Then started the:
complex c1(0.0,0.0);
Cont.......
The Errors are listed below:
Please help! Thanks!!
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