In this part, you will write the implementation of the metho…

In this part, you will write the implementation of the method below. Your implementation should be consistent with the class you’ve written in a prior step (i.e. only use the field(s) and method(s) that exist in the MySortedList class). You do not need to include any import statements or Javadoc comments in your response. T remove(T element) throws IllegalArgumentException, NoSuchElementException Removes and returns the element in the list that is equal to the element passed in. Remaining elements should be shifted towards the beginning of the list (see diagram). This method MUST use the remove(int index) method to perform the removal! HINT: the implementation of this method is simple if you’ve implemented the remove(int) and firstOccurrenceIndex(T) methods. Think about how you can use these two methods to find and remove an element that is equal to the argument (and throw the required exceptions, if necessary). Method throws IllegalArgumentException when the argument is null. The message should contain text describing the reason the argument is illegal. You may assume that IllegalArgumentException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. Method throws NoSuchElementException when an element equal to the argument doesn’t exist within the list. You may assume that NoSuchElementException is an unchecked exception and has a constructor that takes in a single String parameter representing the message. Make sure to select the ‘Preformatted’ style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.

In this part, you will write the implementation of the MyArr…

In this part, you will write the implementation of the MyArrayQueue class and its nested inner class MyArrayQueueIterator. DO NOT implement the MyQueue methods here. You should only provide the following in your response: the class header necessary field(s) HINT: the size of the queue isn’t the same as the length of the backing array. You’ll want to keep track of the logical size of the collection using a private field. required Iterable method(s) complete MyArrayQueueIterator class implementation You do not need to include any import statements or Javadoc comments in your response. The requirements for the MyArrayQueue class are as follows: MyArrayQueue will support the interface below. Make sure that you are not using any raw types (i.e. you must use the generic type parameter in your solution). public interface MyQueue extends Iterable { … } The MyArrayQueue class must have ONE private array that is used to store the elements of the queue. This class must also have a single, no-argument constructor that creates the generic array of type T with an initial length of 10. No other constructors should be written. NOTE: For ease of implementation, you can assume that new T is valid syntax for creating a new array of type T. You can earn 5 bonus points if you know the correct way to create a new array of a generic type that will compile in Java. The MyArrayQueue class should also have a nested inner class named MyArrayQueueIterator that satisfies the requirements of the Iterator interface. The iterator should iterate over the elements in the queue from the first-to-last element to be removed. Remember that nested inner classes have access to the private data members of the enclosing class! (i.e. the iterator will be able to access the backing array and any other fields of the queue class) Think carefully about what state information an iterator will need to iterate over an array and don’t overcomplicate it. The first element to be removed must always be located at index 0 in your array. Don’t forget that one of the Iterator methods should throw a NoSuchElementException when the iterator is asked to return an element when there are none left! The exception’s message should tell the user that the queue contains no more elements. IMPORTANT: DON’T FORGET TO IMPLEMENT THE METHOD(S) REQUIRED BY THE Iterable INTERFACE! Make sure to select the ‘Preformatted’ style from the dropdown so your code is formatted clearly. DO NOT USE THE TAB KEY WHEN WRITING CODE AS YOU MAY ACCIDENTALLY SUBMIT YOUR EXAM. USE THE SPACE BAR INSTEAD.

Consider the graph of given below. Note that this is the gr…

Consider the graph of given below. Note that this is the graph of and not the graph of . Again, this is the graph of and not the graph of . At which of the following values of does have a local maximum value?  ( may have more than one local maximum value. The -coordinate for only one is listed below.)