Question: lists question check all the pictures below .. Write a Java application that contains the following: 1- A static method named removeSmallestEven that receives an

lists question
check all the pictures below ..
lists questioncheck all the pictures below .. Write a Java application that
contains the following: 1- A static method named removeSmallestEven that receives an
unsorted list of integers of type ArrayUnsortedLi ist class. Your method should
remove the smallest even number, if any exist, from the given list.
Keep the list unchanged and return 1 in case there are no

Write a Java application that contains the following: 1- A static method named removeSmallestEven that receives an unsorted list of integers of type ArrayUnsortedLi ist class. Your method should remove the smallest even number, if any exist, from the given list. Keep the list unchanged and return 1 in case there are no even numbers in the given list. 2- A main method that creates an unsorted list of integers. Fill the list with any number of integers from the user. Print the list on screen. Use removeSmallestEven method to remove the smallest even number from the list then print the list after removing the element. Print "nothing" if the list does not contain any even number. Sample2 Run: D run: Unsorted List elements: List: 215545531585673599 nothing; the list does not contain any even number BUILD SUCCESSEUL (total time: 0 seconds) // Question 2 code below this line package lists_code: public class ArrayUnsortedList implements ListInterface { protected final int DEFCAP =100;// default capacity protected int origCapi-n /// original capacity protected T] list: // array to hold this listors elements protected int numElements = 0 ; // number of elements in this list protected int currentPos:in. // current position for iteration. II set by find method protected boolean found; // true if element found, otherwise false protected int lecation: // indicates location of element if found public ArrayUnsortedist. \{ list =(T[]) new Object [ DEFCAP]; origCap = DEFCAP; 3 public ArxayUnsortedList(int origCap) \{ list =(T) new Object[origCap]; this.origCan = origCap: \} protected void enlarge. // Increments the capacity of the list by an amount // equal to the original capacity. \{ // Create the larger array. I[] larger = (TD] new Object[list.length + origCap]; // Copy the contents from the smaller array into the larger array. for (int i=0;i

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!