public static void exitSave(HousePetList hpArray)
    {
        /* check whether HousePetList has been modified since start of program */
        boolean isSaved = hpArray.isSaved();
        //if hasBeenSaved == false:
        //  asks user if they want to save before exiting
        //    if yes:
        //      call menuWriteToFile(), which will prompt user for filename, etc
        //    if no:
        //      call displayExitMsg()
        
        /* if no changes have been made to HousePetList during the current run of the
         * program, call displayExitMsg() to let user know they are exiting program */
        if(isSaved == true)
        {
            displayExitMsg();
            return;
        }
        
        /* if HousePetList has been modified during the course of the program, ask user
         * whether they want to save or not, and prompt them for their response */
        //else(if(isSaved == false))
        @SuppressWarnings("resource")
        Scanner console = new Scanner(System.in);
        String userResponse = "";
            
        System.out.println("Current list has not been saved.");
        System.out.println("Would you like to save before exiting program?");
        
        do
        {
            System.out.println("Please type \"yes\" or \"no\"");
            userResponse = console.next();
            console.nextLine();
        }
        while(!userResponse.equalsIgnoreCase("yes") &&
              !userResponse.equalsIgnoreCase("y") &&
              !userResponse.equalsIgnoreCase("no") &&
              !userResponse.equalsIgnoreCase("n"));

        /* if user would like to save, call menuWriteToFile() which will do all the
         * remaining tasks such as prompting user to enter filename to which the current
         * list data will be written, handling the writing to file, etc. */
        if(userResponse.equalsIgnoreCase("yes") || userResponse.equalsIgnoreCase("y"))
        {
            Lab6Menu.menuWriteToFile(hpArray);
        }
           
        /* display msg to user informing them they are exiting the program */
        displayExitMsg();
        
        return;
        
    }//end writeToFile()