This is for an assignment, describing the procedure is most beneficial for me, rather that solely computing the result.
I want to evaluate the following integral:
$$\int_C\text{Re}\;z\,dz\,\text{ from }-4\text{ to } 4$$ Along the line segments from $-4$ to $-4-4i$ to $4-4i$ to $4$, e.g:

So I want to evaluate three integrals of the above three paths, and add them together, is this correct?
Parametrisation for each curve respectively: \begin{align} z(t)=-4-4it,\quad &0\leq t \leq 1\\ z(t)=-4-4i+8t,\quad &0\leq t \leq 1\\ z(t)=4-4i+4it,\quad &0\leq t \leq 1 \end{align}
$$\int_0^1 (-4-4it)(-4i)dt + \int_0^1 (-4-4i+8t)(8)dt+\int_0^1 (4-4i+4it)(4i)dt$$ $$=16\int_0^1 (i-t)dt+32\int_0^1(-1-i+2t)dt+16\int_0^1 (i+1-4t)dt$$ $$=16\left[it-\frac{t^2}{2}\right]_0^1 + 32\left[-t-it+t^2\right]_0^1+16\left[it+t-2t^2\right]_0^1$$ $$=16(i-\frac12)+32(-1-i+1)+16(i+1-2)$$ $$16i-8-32-32i+32+16i+16-32$$ $$=-24$$
$$\int_C xdz = \int_0^{-4} (-4) \,i\,dy+\int_{-4}^{4}x\,dx+\int_{-4}^0 (4) \,i\,dy=i32$$