Question: pre 37 words > Write a complete method from the client perspective to create a new ListInterface object that contains all Strings on a

pre 37 words > Write a complete method from the client perspectiveto create a new ListInterface object that contains all Strings on awordList that contain a given character. The method header is: public staticListInterface createListInterfaceContainingChar(Lis tInterface word List, char targetChar) For Full Credit: The relativeorder of the names in the returned list should match the order

pre 37 words > Write a complete method from the client perspective to create a new ListInterface object that contains all Strings on a wordList that contain a given character. The method header is: public static ListInterface createListInterfaceContainingChar(Lis tInterface word List, char targetChar) For Full Credit: The relative order of the names in the returned list should match the order of the names in the parameter list. The wordList parameter should be unchanged when the method completes. Consider case/capitalization. (In other words, 'c' is different from 'C!) Do not invoke the toArray() method. Do not use another data structure, such as ArrayList or an array. Note: You can use local objects of type ListInterface (initialized as AList or LList). Question 4 Paste the complete createListInterfaceContainingChar method here. Edit View Insert Format Tools Table 12pt Paragraph BIUA 10 pts Write a complete method from the client perspective to find the last position of an itern in a List. The method header is: public static int lastPosition (List word List, String target) For Full Credit: The wordList parameter should be unchanged when the method completes. If the item appears more than once, return the position of the last appearance. Decide what to do if the item is not on the list. Make sure your action is logical. Do not use the lastIndexOf method from the ArrayList class. This question is essentially asking you to re-write this method for yourself. You will receive 0 points if your method invokes lastIndexOf. Question 5 Paste your complete lastPosition method here. Edit View Insert Format Tools Table 12pt Paragraph BIUA 10 pts Optional Extra Credit (10 points) Find the maximum value in a List and move that value to the front of the list. The method header is: public static void prioritizeMaximumValue(List numberList) Notes: If there is more than one copy of the maximum, you can move any one of those copies to the front. Because there is more than one right answer here, the driver program does not include tests for this. I suggest adding your own tests. You are not swapping values- but performing a shift by moving the maximum value to the front of the list. For Full Credit: Take advantage of the methods provided in List rather than rewriting code to do the same task. . Your code should not crash with empty lists or one-element lists. Do not use another data structure, such as ArrayList or an array. Question 45 Paste your complete prioritizeMaximumValue method here. Edit View Insert Format Tools Table 12pt Paragraph BIUA 0 pts Also remember that when working from the client interface, you do not know what the implementing class is! You only know that an object is of type BagInterface or ListInterface. You don't know what the actual type is (e.g., it could be ArrayBag, LinkedBag, or some other implementing class). For Full Credit: Do not use the toArray method. The purpose of the coding questions are to practice with the BagInterface, ListInterface, and List interfaces, not to work directly with arrays. Do not use a different data structure from the one in the question. For example, in a coding question that uses BagInterface, do not use a List, ListInterface, ArrayList, array, etc.. Post any questions about what data structures or classes you should and should not use to the discussion board. Again, the reason for this is that I want you to get practice with these specific interfaces. You will be graded both on syntax (the code compiles) and semantics (the code accomplishes the task). Write a complete method from the client perspective that determines if a bag contains any duplicate items. For full credit, the parameter bag should have the same contents before and after the method executes. The method header is: public static boolean contains Duplicates (BagInterface wordBag) For Full Credit: Do not use another data structure, such as ArrayList or an array. Write a complete method from the client perspective to determine if a ListInterface and List of numbers have equivalent contents- meaning the same numbers in the same order. The method header is: public static boolean equivalent Lists (ListInterface numberListInter face, List numberList) For Full Credit: Neither parameter list should be changed when the method completes. In order to be considered equivalent, the two lists should be the same size. Be sure to account for special sizes (e.g., 0 and 1). Do not convert either list to an array. Do not use another data structure, such as ArrayList, AList, or an array. Question 6 Paste your complete equivalentLists method here. Edit View Insert Format Tools Table 12pt Paragraph BIU A > T 15 pts

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!