Slope Calculator written in Java