Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

C++ only

image text in transcribed

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions