How can we verify area of square and rectangle by calculus ?

a rectangle is the area bounded by

x=0
y=0
y=h
x=w

area = Integral(y dx)[0,w]
= Integral(h dx)[0,w]
= hx[0,w]
= hw