Question: In-Lab Exercise (10 points) Submit the solution files of Exercises online before the due date/time. Please upload Point.h and Point.cpp your assignment for Exercise 1


In-Lab Exercise (10 points) Submit the solution files of Exercises online before the due date/time. Please upload Point.h and Point.cpp your assignment for Exercise 1 and Rect.cpp and Rect.h for Exercise 2 to Canvas. Exercise 1. This is a simple Point class interface file whose objects represent points in the cartesian plane \#include using namespace std; class Point \{ public: Point(); // default constructor Point(double x, double y ); // another constructor double x( ) const; // get function, return _ x double y() const; // get function, return y private: double x,; \} ; Here is a test driver file for the Point class (do not modify the driver file): \#include "Point.h" // defines Point class \#include using namespace std; int main() \{ Point p0; // invokes default constructor Point p1 (5,2);// invokes constructor Point p2 = p1; p0 =p1;// invokes assignment operator cout "p0.x() =" po.x( )" "; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
