Considering a polygon with n vertices as input.
I need to calculate the integral of the form \[\int_A p(y) dA \] where $p(y)$ is a piecewise polynomial function of $y$.
May be if I could find the expression $b(y)$ then the integral can be calculated by: $$\int_{0}^{y_\max} p(y) b(y) dy $$
The question is : "is there a straightforward method to find $b(y)$ given the coordinates of the polygon vertices? Or is there a simpler manner to calculate the integral above?"

I posted a comment about Green's Theorem earlier, but since nobody has answered this question so far, I figured I might as well write one up. Green's Theorem states:
$$\oint_C P\ dx+Q\ dy=\iint_A\left(\dfrac{\partial Q}{\partial x}-\dfrac{\partial P}{\partial y}\right)dA$$
In the context of this problem, $C$ denotes the boundary of the polygon and $A$ denotes the interior of the polygon. Obviously, $C$ is piecewise smooth, simple, and closed, and so we can invoke Green's Theorem (we do have to be careful with the orientation).
As you stated, we need to calculate the integral
$$\iint_A p(y)\ dA$$
where $p(y)$ is a polynomial. Let $P(x, y)=-\int_0^yp(t)\ dt$ and $Q(x, y)$ be constant (note that $P$ just has to be the negative of any antiderivative of $p$, I chose one arbitrarily). Then, it follows that
$$\left(\dfrac{\partial Q}{\partial x}-\dfrac{\partial P}{\partial y}\right)=p(y)$$
From here, we can equate
$$\iint_Ap(y)\ dA=\oint_CP\ dx$$
and compute the line integral. The rest should be straightforward.