Use C++. This lab will help you practice with operator overloading (mixed with classes).
A friend has a point class that needs some help with its interface. You volunteer to help add operator overloading to the class. (No, really, you did. Don't you remember?)
You decide to overload operators for the distance between two points (operator-), input (operator>>), output (operator<), equality="" (operator="=)," and="" inequality="" (operator!=")." after="" a="" bit="" of="" arguing,="" you="" decide="" to="" also="" overload="" for="" midpoint="">),>
You decide to also fix up your friend's class by adding operator= and 'missing' constructors.
Don't forget to write a small test application to show that the class still works -- new operators and all!
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here