Question: Question 3: In the following problem #include using namespace std; dass Point private: intx inty: public: void print const; void setfint, int): } ; dass

 Question 3: In the following problem #include using namespace std; dass

Question 3: In the following problem #include using namespace std; dass Point private: intx inty: public: void print const; void setfint, int): } ; dass Linel private Point ps: Point per public: void print(const, void setfint, int, int, int): int lengthLine(): 1: dass Rectangle private: Line length(2): Line breadth[21: public: void print(const; void setfint, int, int, int, int, int, int, int); int areaRectangle(); 1: int main() Rectangle ; r1.setf(3,4,5,6, 7, 8, 9, 10): r1.print(); return 0; 1 1. Implement each classes Point, Line and Rectangle with appropriate constructors 2. What is the call of constructor of point, line and rectangle when r1 is created? What is the call of destructor of point, line and rectangle when r1 goes out of scope

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!