Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

public interface Searcher { // Constants // Declare an integer constant called N

ID: 3865609 • Letter: P

Question

public interface Searcher {
// Constants
// Declare an integer constant called NOT_FOUND having the value -1

  
// Abstract Methods
// Declare an abstract method called searchFor
// with one integer parameter, called key
// and an integer return type.
// This method, when implemented, will return the index
// where the key is located. If the key is not found, NOT_FOUND is returned.

  
// Declare an abstract method called display with no parameters.
// It does not return anything.
// This method, when implemented, will display the search pool.

  
}

Explanation / Answer

public interface Searcher {
public int NOT_FOUND=-1;
  
public int searchFor(int key);
public void display();
}