Menu

(Solved) : 3 Consider Following Program Trace Explain Detail Code Write Functions 31 Multiply Realpar Q44072328 . . .

3-Consider the following program: Trace, explain in detail the code, and Write functions that 3.1- multiply the realpart and3-Consider the following program: Trace, explain in detail the code, and Write functions that 3.1- multiply the realpart and imaginarypart of a complex number by a given factor, respectively. (Hint: see main() and output provided) 3.2. A Boolean compare function using an operator function(operators()) or a friend function for the Complex class that compares the two complex numbers. (Hint: Use the class definition for question 2) inom boll69 22615 9190-5 2nolul 19mm inwollo osobulantolons Visund olsun o nom 1997 in 99 Note: Include the functions constructed for in a complete C++ program for testing. (30 pts) of obserl bris #include <iostream> using namespace std;1599nom other tart m12 10 ouenos class Complex in nomadi bist natutugning private: 19 double realpart; double imaginarypart; // public: Complex (double real = 0., double imag = e.e) // { realpart = real; imaginarypart = imago) or notugon m uoto o ns on rumus no mom ogni notab eembodima void showcomplexvalues(); // void assignnewvalues(double real, double inas) // realpart real imaginarypart 1 0 now Complex multScaler (double – 1.0); // colox:showcomplexvalues on our own butto i char sign = ”; if (imaginarypart < 0) sign -..’; cout << realpart < < sign << << abs(imaginarypart) < 1 . Show transcribed image text 3-Consider the following program: Trace, explain in detail the code, and Write functions that 3.1- multiply the realpart and imaginarypart of a complex number by a given factor, respectively. (Hint: see main() and output provided) 3.2. A Boolean compare function using an operator function(operators()) or a friend function for the Complex class that compares the two complex numbers. (Hint: Use the class definition for question 2) inom boll69 22615 9190-5 2nolul 19mm inwollo osobulantolons Visund olsun o nom 1997 in 99 Note: Include the functions constructed for in a complete C++ program for testing. (30 pts) of obserl bris #include using namespace std;1599nom other tart m12 10 ouenos class Complex in nomadi bist natutugning private: 19 double realpart; double imaginarypart; // public: Complex (double real = 0., double imag = e.e) // { realpart = real; imaginarypart = imago) or notugon m uoto o ns on rumus no mom ogni notab eembodima void showcomplexvalues(); // void assignnewvalues(double real, double inas) // realpart real imaginarypart 1 0 now Complex multScaler (double – 1.0); // colox:showcomplexvalues on our own butto i char sign = ”; if (imaginarypart

Expert Answer


Answer to 3-Consider the following program: Trace, explain in detail the code, and Write functions that 3.1- multiply the realpart…

OR