
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
Information about quiz 2 for the cmsc 132 course, including the quiz date, format, and rules. It also includes exercises to prepare students for the quiz, which involve implementing methods for a mylinkedlist class in java. The methods include constructing an empty list, adding an element to the beginning, determining list size, removing the last node, finding an element, inserting an element after the middle, and deleting the middle element.
Typology: Quizzes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

The second quiz for the course will be on Friday, Jun 15. 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. You cannot use any Java API class during the implementation of the methods below.
Exercises
Implement the methods below based on the following Java class definitions.
public void insert(T element);
The method will insert the element after the middle element of list. We define the middle element of the list as the node with “index” value equal to (size of the list)/2.
public void delete(T element);
The method will delete the middle element of the list. We define the middle element of the list as the node with “index” value equal to (size of the list)/2.