ThedrawPolygon(int x[], int y[], int numOfPoints)method draws an outline polygon as per the coordinates specified in thex[]andy[]arrays. ThenumOfPointsgives the number of points that is 3 in the case of a trian