The problem: What if points have the same x-value, hence the slope is undefined.
Solution 1 Exceptions: throw new DivisionByZero()
Solution 2 Condition Handling: provide the restarts point to (a) return nil, (b) return 0, and (c) return a user-specified value.
Solution 3 Return Error: return Error("division by zero")
The problem: What if points have the same x-value, hence the slope is undefined.
Solution 1 Exceptions: throw new DivisionByZero()
Solution 2 Condition Handling: provide the restarts point to (a) return nil, (b) return 0, and (c) return a user-specified value.
Solution 3 Return Error: return Error("division by zero")