Make methods much simpler.

Change setNumberOfPointsInGraph. Now no need
create temp array and adding objects in
pointsArray. Change finding max and min in
calculateHeight.