Add toString method to Line class