C++ only
Create point.hpp header file and implement Point class in it.
Successfully Compile and Pass all the tests given in main.cpp file (attached picture is main.cpp)
#include..point.hpp.. #include 3
", "[Point]") 8 Point pl; REQUIRE (p1.x0); REQUIRE(p1.y -0)- REQUIRE(plp1); 10 12 13 14 15 16 Point p2(1, -1); REQUIRE (p2.x 1); REQUIRE(p2.y1): REQUIRE (p2 != p1); REQUIRE (p2! Point(1, 0)); REQUIRE (p2Point (0, -1)); 18 19 20 21 REQUIRE (pl + p2 p2); REQUIRE (p2 pl p2) REQUIRE(-p2Point (-1, 1)); 24 25 26 27 28 REQUIRE (p1ppl); REQUIRE (p1 / p2 = p1); REQUIRE (p2 10Point (10, -10)) REQUIRE (10 * p2 Point (10, -10)); REQUIRE (p2 / 1 = p2); 31 32 REQUIRE( (p2Point (10, 10)Point (11, 9); REQUIRE ( ( p2-= Point ( 10, 10) ) = Point ( 1, -1) ); REQUIRE ( p2 Point (10, 10)Point(10,-10) REQUIRE( ( p2 /= Point (-1, -1) ) = Point (-10, 10) ); 35 36 REQUIRE &( p2Point(10, 10&p2) REQUIRE( &( p2 -- Point ( 10, 10) ) = &p2 ); REQUIRE &( p2Point (10, 10)p REQUIRE(&( p2/Point(-1, -1) p2); 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 REQUIRE( Point(-1, -1) (-1, -1) (-1, -1) (-1,1) (0, -1) (0, 0)(-1, -1) >-Point(-1, -1) ; REQUIRE( Point(-1, 0) >= Point (-1, -1) ); REQUIRE ( Point(0, 0) > Point (-1,-1); std::stringstream ss; SS ", "[Point]") 8 Point pl; REQUIRE (p1.x0); REQUIRE(p1.y -0)- REQUIRE(plp1); 10 12 13 14 15 16 Point p2(1, -1); REQUIRE (p2.x 1); REQUIRE(p2.y1): REQUIRE (p2 != p1); REQUIRE (p2! Point(1, 0)); REQUIRE (p2Point (0, -1)); 18 19 20 21 REQUIRE (pl + p2 p2); REQUIRE (p2 pl p2) REQUIRE(-p2Point (-1, 1)); 24 25 26 27 28 REQUIRE (p1ppl); REQUIRE (p1 / p2 = p1); REQUIRE (p2 10Point (10, -10)) REQUIRE (10 * p2 Point (10, -10)); REQUIRE (p2 / 1 = p2); 31 32 REQUIRE( (p2Point (10, 10)Point (11, 9); REQUIRE ( ( p2-= Point ( 10, 10) ) = Point ( 1, -1) ); REQUIRE ( p2 Point (10, 10)Point(10,-10) REQUIRE( ( p2 /= Point (-1, -1) ) = Point (-10, 10) ); 35 36 REQUIRE &( p2Point(10, 10&p2) REQUIRE( &( p2 -- Point ( 10, 10) ) = &p2 ); REQUIRE &( p2Point (10, 10)p REQUIRE(&( p2/Point(-1, -1) p2); 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 REQUIRE( Point(-1, -1) (-1, -1) (-1, -1) (-1,1) (0, -1) (0, 0)(-1, -1) >-Point(-1, -1) ; REQUIRE( Point(-1, 0) >= Point (-1, -1) ); REQUIRE ( Point(0, 0) > Point (-1,-1); std::stringstream ss; SS