Edited by Zhuo Chen: Encapsulate points into randomLine.java