JAVA Demonstrate the use of your APL in a PartB_Driver class by doing the following. Create a static method called removeConsecutiveDuplicates that removes any consecutive duplicate strings from an array positional list of Strings and returns the number of strings left after the removal. After calling the method, the positional list parameter should contain the same sequence of strings as before but with any consecutive duplicates removed. Illustrate your method using the following sets of strings and display the content of the list after executing the method. NOTE: You MUST use a combination/variation of ALL the add and set methods (AddFirst, AddLast, AddBefore, AddAfter, and set) in creating one of the following original lists. - harry ron tom tom tom hermione - harry harry tom ron mary harry - tom ron harry hermione mary - mary mary tom james hermione hermione james harry harry harry You MUST NOT use any other auxiliary data structure e.g., arrays in your implementation ofremoveConsecutiveDuplicates. Sample Output (for last set of Strings) Original positional list: [0] mary [1] mary [2] tom [3] james [4] hermione [5] hermione [6] james [7] harry [8] harry [9] harry APL.java public class ArrayPositionalList<E> implements PositionalList<E> { private static class ArrPos<E> implements Position<E> { private int index; private E element; public ArrPos(E e, int i) { index = i; element = e; } public E getElement() throws IllegalStateException { if (index == -1) { throw new IllegalStateException("Position no longer valid"); } return element; } public void setElement(E e) { element = e; } public int getIndex() { return index; } public void setIndex(int i) { index = i; } } public static final int CAPACITY = 16; private ArrPos<E>[] data; private int size = 0; public ArrayPositionalList() { this(CAPACITY); } public ArrayPositionalList(int capacity) { data = (ArrPos<E>[]) new ArrPos[capacity]; } @Override public int size() { return size; } @Override public boolean isEmpty() { return size == 0; } @Override public Position first() { if (!isEmpty()) return data[0]; return null; } @Override public Position last() { if (!isEmpty()) return data[size - 1]; return null; } @Override public Position before(Position p) throws IllegalArgumentException { if (p.getIndex() > 0 && p.getIndex() < size) { return data[p.getIndex() - 1]; } if (p.getIndex() == 0) return null; throw new IllegalArgumentException(); } @Override public Position after(Position p) throws IllegalArgumentException { if (p.getIndex() >= 0 && p.getIndex() < size - 1) { return data[p.getIndex() + 1]; } if (p.getIndex() == size - 1) return null; throw new IllegalArgumentException(); } @Override public Position addFirst(E e) { if (size < data.length) { for (int i = size - 1; i >= 0; i--) { data[i + 1] = data[i]; data[i + 1].setIndex(data[i + 1].getIndex() + 1); } data[0] = new ArrPos<E>(e, 0); size++; return data[0]; } return null; } @Override public Position addLast(E e) { if (size < data.length) { da.