Question: Four doubles are read from input, where the first two doubles are the x and y values of point 1 and the second two doubles
Four doubles are read from input, where the first two doubles are the x and y values of point and the second two doubles are the x and y values of point Define two functions to overload the operator. The first function overloads the operator to add two D points. The second function overloads the operator to add a D point and a double representing the x value of the point.
Ex: If the input is then the output is:
Note: The sum of two points is:
the sum of the x values of the points
the sum of the y values of the points
Note: The sum of a point and a double representing the x value of the point is:
the sum of the x value of the point and the double
the y value of the point is unchanged
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
