The number in parentheses at the end of an exercise refers to the learning objective listed at the beginning of the chapter.
Redo Exercise 29 so that the operators ~ and ! are overloaded as nonmember functions. (6)
Reference:
Let a + ib be a complex number. The conjugate of a + ib is a – ib, and the absolute value of a + ib is
. Extend the definition of the class complexType of the Programming Example: Complex Numbers by overloading the operators ~ and ! as member functions so that ~ returns the conjugate of a complex number and ! returns the absolute value. Also, write the definitions of these operator functions. (6)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.