Question: define the class defined by the UML: USING THE PROGRAMMING LANGUAGE C + + Point 2 D - x: double - y: double + Point

define the class defined by the UML: USING THE PROGRAMMING LANGUAGE C++
Point 2D
- x: double
- y: double
+ Point2D();
+ Point2D (x1:double, y1: double)
+ Point2D (P1: const Point2D&)
+ setX(x1:double) : void
+ setY(y1: double) : void
+ getX() const: double
+ getY() const: double
+ getDistanceToOrigin() const: double
+ getAngle() const: double
+ shift(dx: double, dy: double) : void
+ distanceToPoint(P2: const Point2D&) : double)
+ friend operator+(P1: const Point2D&, P2: const Point2D&): Point 2D
+ friend operator <<(os: ostream&, P1: const Point2D&) : ostream&
+ friend operator >>(is: istream&, P1: const Point2D&) : istream&

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!