Question: Exercise 3 : ArrayLists of Objects Redo exercise 2 , but with the Line objects stored in a java.util.ArrayList instead of a raw array of

Exercise 3: ArrayLists of Objects
Redo exercise 2, but with the Line objects stored in a java.util.ArrayList instead of a raw array of Line objects. So the methods become:
public Line longestLine( ArrayList lineList ):
Returns the Line with maximum length. If there are multiple Lines that tie for the longest length, it may return any one of those Lines.
public void deleteOriginLines( ArrayList lineList ):
Deletes every Line that starts or ends at point (0,0).
See attached of exercise 2.
Exercise 3 : ArrayLists of Objects Redo exercise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!