Question: C++ Object oriented programming Note: please use an IDE to crosscheck the answer. Complete the right given C++ program regarding rectangles and pointers: (a) the

C++ Object oriented programming

Note: please use an IDE to crosscheck the answer.

C++ Object oriented programming Note: please use an IDE to crosscheck the

answer. Complete the right given C++ program regarding rectangles and pointers: (a)

Complete the right given C++ program regarding rectangles and pointers: (a) the structure rectangle shall have a pointer upper Left to its left upper and a pointer lowerRight to its right lower corner. (b) Function print shall have a pointer r to a rectangle as only parameter and output the coordinates of the two corners like in the example below. Complete in function main (c) an array p with two pointers to points, (d) initialise each pointer of array p with a new point on the heap, (e) define a pointer r to a rectangle and initialise it to a new rectangle on the heap. Input the coordinates (f) of the first and (g) of the second point of array p, (h) assign the first point of array p as left upper and (i) the second point as right lower corner of r, (i) delete rectangle r as well as (k) delete the complete array p on heap. Beispiel/Example , (-3,2) 7 input coordinates first point: -32 Jinput coordinates second point: 1 1 upper left corner : (-3,2) lower right corner: (1,1) TAH P03 (2019-11-08) #include using namespace std; struct point { double x, y; }; struct rectangle (a) { _upperLeft, }; (b)void print { cout

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!