public static void menuRemove(HousePetList hpArray)
    {
        HousePet housepet = new HousePet();
        HousePet removedHP = new HousePet();
        @SuppressWarnings("resource")
        Scanner console = new Scanner(System.in);
        int aChipID = -1;
        String outputStatement = "";
        
        /* display all HousePets */
        HousePetListImpl.displayAll(hpArray);
        
        /* prompt user to choose which HousePet to remove */
        System.out.println("Please enter the chipID of the HousePet you wish to remove");
        
        try
        {
            aChipID = console.nextInt();            
        }
        catch(InputMismatchException e)
        {
            System.out.println("Error: a non-int was entered " + e);
            return;  
        }
        catch(NoSuchElementException e)
        {
            System.out.println("Error: chipID not found " + e);
        }
        catch(IllegalStateException e)
        {
            System.out.println("Error: Scanner is closed " + e);
        }
        
        housepet.setChipId(aChipID);  //if user entered invalid value, chipID will = 0.
                
        /* if user-provided chipID is valid, call remove(),which will return
         * HousePet that has been removed from the list
         */
        if(aChipID > 0)
        {
            removedHP = hpArray.remove(housepet);
            
            /* determine the contents of outputStatement */
            if(removedHP == null)
            {
                outputStatement = "the HousePet with chipID " + aChipID +
                    " was not found in the list";
                
            }//end IF(removedHP == null)
            
            else  //if(hpArray contains housepet)
            {
                outputStatement = "The HousePet was removed from the list; its " +
                    "attributes are displayed below.\n" + removedHP;
                
            }//end ELSE
            
        }//end IF(chipIdToRemove > 0)
        
        else  //if(chipIdToRemove <= 0)
        {
            outputStatement = "You entered " + aChipID + ".\n" +
                "The chipID you entered was either zero or a negative integer.\n" +
                "A negative number is an invalid value for a chipID, and a HousePet " +
                "with a chipID of zero is an unacceptable candidate for removal since " +
                "there may currently be more than one HousePet with a chipID of 0.\n" +
                "In either case, the HousePet was not removed from the list.";
            
        }//end ELSE(IF(chipIdToRemove <= 0))

        /* report the results of the removal attempt back to the user */
        System.out.println(outputStatement);
        
        return;
        
    }//end menuRemove()