Given the following C++ code and input (Figure 1):
struct POINT{
int x;
int y;
};
struct SHAPE{
struct POINT pt1;
struct POINT pt2;
struct POINT pt3;
struct POINT pt4;
};
void setSHAPE(struct SHAPE &);
int calcArea(struct SHAPE);
void main()
struct SHAPE RECTANGLE;
//your code starts here
}//your code ends here
a) write function definition of setSHAPE() function to set point 1,2,3,and 4 of SHAPE
RECTANGLE
b) write function definition of calcArea() function to compute the area of SHAPE RECTANGLE
c) write a main function that call setSHAPE(), calcArea() and display the area of a shape