Add get slope to line.java