Anyone help with these 3? 6. public void addFewAtEnd(int howMany, Object element
ID: 3641504 • Letter: A
Question
Anyone help with these 3?6. public void addFewAtEnd(int howMany, Object element)
The addFewAtEnd method adds the parameter element at the end of the linked list for the number of times specified by the parameter howMany. For instance, if the parameter integer is 3, then it should add the parameter Object three times at the end of the linked list. If the parameter integer is less than or equals to 0, nothing should be added to the linked list (so the linked list will be unchanged.)
7.
public void searchAndRemove(Object element)
The searchAndRemove method searches the parameter element in the lined list and removes all occurrences of the element in the linked list. If the parameter element does not exist in the linked list, then the linked list should be unchanged.
8.
public void duplicateEach()
The duplicateEach method duplicates every element in the linked list. For instance, if the linked list contains { Apple Apple Banana Lemon }, then after this method is called, the linked list should become { Apple Apple Apple Apple Banana Banana Lemon Lemon }.