Question: 1- Implement the following method: public static void removeAllVowels(BagInterface aBag) The method should remove all vowels (a, e, I, o, u, and y) from the

1- Implement the following method: public static void removeAllVowels(BagInterface aBag) The method should remove all vowels (a, e, I, o, u, and y) from the bag of characters aBag, while keeping the other characters in the bag.

: 2- Implement the following method: public static void replicateEachNode(Node aListOfNodes) The method receives as an argument a reference to the first node in the list aListOfNodes. The method should replicate each node in the list one time. For example, suppose that the list is: 1 -> 5 -> 3 ->2 After the invocation of replicateEachNode, the list should become: 1 -> 1 -> 5 -> 5 -> 3 -> 3 -> 2 -> 2 Keep the original order of the list elements. Use the class Node below: public class Node { private int data; private Node next; public Node(int data) { this(data,null); } public Node(int data, Node next) { this.data = data; this.next = next; } public int getData() { return data; } public Node getNext() { return next; } public void setData(int data) { this.data = data; }

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 Databases Questions!