The binary operator

Programming Exercise 15, Chapter 11, describes how to design  the class pointType to implement a point. Redo this programming exercise so that the class pointType:

a. Overloads the stream insertion operator, <, for=”” easy=”” output.=””>

b. Overloads the stream extraction operator, >>, for easy input.  (A point is input as (a, b).)

c. Overloads the assignment operator to copy a point into another point.

d. Overloads the binary operator +, as a member function, so that it returns the distance between two points.

e. Overloads the operator ==, as a member function,  so that it returns true if two points are the same; false otherwise.

f. Overloads the operator !=, as a member function,  so that it returns true if two points are not the same; false otherwise.

g. Write a program to test your class.

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X