Question: Lab 5 For lab 5 , you need to: - explain your solution to our teaching assistant, and - submit it through the blackboard. Question

Lab 5
For lab5, you need to:
-explain your solution to our teaching assistant, and
-submit it through the blackboard.
Question1:
Create a Point class, implement Equality operator, Inequality operator, Comparison
operator(four), Insertion operator (make it as friend of Point class), Arithmetic operators and
Compound Assignment operator.
Show the Point class and explain to your teaching assistant step by step by using the four test
cases.
Point
-x: int
+Point(int x, int y)// constructor
+operator==(other: Point)
+operator!=(other: Point)
+operator<(other: Point)
+operator>(other: Point)
+operator<=(other: Point)
+operator>=(other: Point)
+operator<<()(friend of Point class)
+operator+(value: int)
+operator+=(value: int)
-y: int

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!