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.


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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
