Write a constructor function called AOI that creates an object to represent a rectangular area of interest on a map. The constructor should take arguments ulx, uly, lrx, lry, where the upper left corner of the rectangle is at coordinates (ulx,uly) and the lower right at (lrx,lry). All of the arguments should be added to the constructed object as properties with the same name as the function argument. Additionally, add a property to the new object called size set to the surface area of the area of interest.

Note that the following exercise is for drill only, i.e. we would normally not organize code this way.

javascript programming
exercise: methods 04