# Chapter 15 Exercise Set 1ΒΆ

Overload the

`-`

operator for`Complex`

objects so that`c1 - c2`

will subtract two complex objects.Overload the

`/`

operator for`Complex`

objects so that`c1 / c2`

will divide two complex objects.Add a member function to

`Complex`

named`abs`

that returns the absolute value of the complex number.Do a web search on how to overload the

`<<`

operator so that given a complex number`c1`

, the statement:cout << c1 << endl;

will display a human readable representation of

`c1`

.Rewrite the

`Point`

structure introduced in Point objects as a class with member functions, including overloaded`+`

and`-`

operators for adding and subtracting points. Use what you learned in the previous exercise to overload`<<`

for printing times.Overload the

`*`

operator for the`Point`

class you created in the previous exercise two ways: one for scalar multiplication, that has a double as a left operand and a`Point`

as a right operand and returns a`Point`

, and another that computes the dot product of two`Point`

operands, returning a double.Rewrite the

`Time`

structure introduced in Time as a class with member functions, including overloaded`+`

and`-`

operators for adding and subtracting times. Overload`<<`

for printing times.