Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Quiz; Professor: Padua-Perez; Class: OBJECT-ORIENTED PROG II; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;
Typology: Quizzes
1 / 1
The second quiz for the course will be on Wednesday, Sept 20, during your lab session. The following list provides more information about the quiz:
The following exercises cover the material to be included in this quiz. Solutions to these exercises will not be provided, but you are welcome to discuss your solutions with the TA or instructor during office hours. We strongly recommend you do not use Eclipse to write the code associated with these exercises. Try to answer the exercises in a piece of paper and then use Eclipse to verify your solutions. This approach will better prepare you for the quiz.
Exercises
Implement the methods below based on the following Java class definitions.
public boolean insert(String entry, String target);
The method will look for the first instance of target in the list and will insert entry before that instance. The method will return true if a target instance is found and false otherwise. The list should not be modified if a target instance is not found.
public LinkedList filter(Integer value);
The method will return a new LinkedList with values that are less than or equal to the parameter. The method should not modify the original (current object) list.