This is the assignment I'm working on right now...

Implement a program that reads in a user password and verifies it meets the following criteria:
Is atleast 8 characters long

Contains atleast 1 lower letter character

Contains atleast 1 upper letter character

Contains atleast 1 numeric digit

Contains atleast 1 special character from the set: !@#$%^&\*

Does not contain the word “and” or the word “end”

Output a string that prompts the user for a password and include the requirements 
above in your output. 

Output a string that states valid or invalid. If invalid, state which rule above has not been met.

Utilize the following functionality:

indexOf

Looping structure

charAt()

isDigit()

isUpperCase()

isLowerCase()

and any additional functionality needed

The tricky part to me is that it has to return with all of the things that are missing. Like if I put in a password that says password, it should come back and tell me "you're missing an upper case, a digit, and a special character"

I have a start, but I'm really confused on how to get it to return something to me. 
This is what i have so far

```
    /********************************************
    This program will test a password for:
    8 characters
    1 upper case
    1 lower case
    1 numeric digit
    1 special character from the set !@#$%^&*
    and make sure it doesn't contain AND or END

    If the password complies, it will return a valid answer
    If not, it will tell the user what they need to do.
    *********************************************/

    import java.util.Scanner; 

    public class YoungAmyProg5 
    { 

        public static void main(String[] args) 
        { 
            Scanner in = new Scanner(System.in); 
            String input; 
            //input password
            System.out.println("Enter a password that follows               these rules:\n Is at least 8 characters long\n Contains             at least 1 lower case letter\n Contains at least 1 upper            case letter\n Contains at least 1 numeric digit\n                       Contains at least 1 special character from the set: !               @#$%^&*\n Does NOT contain the word "and" or the word           "end": ")
    input= in.nextLine ();

//Put through string and reply
if 

    public static boolean isSecurePassword(String password) { 

    int lengthPassword = password.length(); 
    if (lengthPassword >= 8 ) { 
        return false; 
    } 

    boolean hasUppercase = false; //uppercase
    boolean hasLowecase = false;  //lowercase
    boolean hasDigit = false; //digit
    int specialChar = input.indexOf('!', '@', '#', '$', '%', '^', '&', '*'); //special character
    int word = input.indexOf ('and', 'end'); //and or end
    for (int i = 0; i < lengthPassword; i++) { 
        char ch = password.charAt(i); 
        if (Character.isUpperCase(ch) ) { 
            hasUppercase = true; 
        } 
        if (Character.isLowerCase(ch) ) { 
            hasLowercase = true; 
        } 
        if (Character.isDigit(ch) ) { 
            hasDigit = true; 
        }
        if (specialChar>0) {
            specialChar = true; 
        } 
        if (word>0) {
            word = true;
        }

```