(Using java)I have an addressbook created, and a menu that you can select from within it, to do different things in the address book. Choosing menu item 2, you can search the book for members with the last name being whatever you want to search (inputted from the console). I search the address book for a last name contained in the book. There are multiples of some of the names I am searching. When I do my binary search (mandatory its binary) I only return one of the names, rather than returning all the names that match my search name. Here is my code:

```
 case '2': //search by last name// only returning 1 person....

        name.lastName="";
        System.out.println("Please enter the last name of the person you 
                           are looking for.");
        name.lastName = console.next(); 

        int find = binarySearchLast(name);
        System.out.println(find);
        System.out.println(bookMembers[find]);
        process();
        break;

 private int binarySearchLast(ExtPerson  name)
{
    int first = 0;
    int last = nMembers; //number of people in the book
    int mid = 0;

    boolean found = false;

    while (first <= last && !found)
    {
        mid = (first + last) / 2;
        //System.out.println("This is the mid : "+mid);
        if (bookMembers[mid].lastName.compareTo(name.lastName)==0)
            found = true;
        else if (bookMembers[mid].lastName.compareTo(name.lastName)<0)
            first = mid + 1;

        else
            last = mid - 1;
        //System.out.println("This is the mid : "+mid);
    }

    if (!found)
        mid = -1; //it is an unsuccessful search
    // System.out.println("This is the mid : "+mid);
    return mid;
}//end binarySearch

```

The code works, but only returns one of the people with that last name. There are actually (depending on the name searched)as many as three people that can match the searched name. I want all the matches returned. Thanks for any help