Concepts tested by this program:
Create an application that will check for valid passwords. The following rules must be followed to create a valid password.
1.At least 6 characters long
2.More than 10 characters is a strong password, between 6 and 10 characters is a weak (but acceptable) password.
3.At least 1 numeric character
4.At least 1 uppercase alphabetic character
5.At least 1 lowercase alphabetic character
6.No more than 2 of the same character in a sequence
Hello123 – OK
AAAbb123 – not OK
Aaabb123 – OK
When the application begins, the user will be presented with a screen that states the above instructions for creating a password, two text entry boxes for typing in a password, and three buttons.
If the user wants to check a single password, they will type in the password in both boxes and select the Check Password button.
If the user wants to read in and check a list of passwords, they will select the Check Passwords in File button, be presented with a file explorer, and select the file to read from. Those passwords that failed the check will be displayed, with their error message.
If the user presses the Alt key, a letter will be underlined in each button label. That letter is the mnemonic that can used as a shortcut (Alt plus the letter) to execute the button.
If the user hovers his cursor over a button, a tooltip will be shown.
The Data Element
The Data Structure
ArrayList of Strings
The Data Manager
Create a PasswordChecker class that implements PasswordCheckerInterface. The PasswordChecker class will have at least two methods: One method that checks the validity of one password that returns true if the password is valid and that throws an exception if invalid. One that checks an ArrayList of passwords and returns an ArrayList with the status of any invalid passwords. The ArrayList of invalid passwords will be of the following format:
< password>< space>< message of exception thrown>
Create exception classes for each exception listed in PasswordCheckerInterface.java.
Once the password fails one rule, you do not need to check the rest of the rules.
Provide exception classes for the following:
1.Length of password is less than 86 characters (class LengthException) Message The password must be at least 6 characters long
2.Password doesnt contain an uppercase alpha character (class NoUpperAlphaException) Message The password must contain at least one uppercase alphabetic character
3.Password doesnt contain a lowercase alpha character (class NoLowerAlphaException) Message The password must contain at least one lowercase alphabetic character
4.Password doesnt contain a numeric character (class NoDigitException) Message The password must contain at least one digit
5.Password contains more than 2 of the same character in sequence (class InvalidSequenceException) Message The password cannot contain more than two of the same character in sequence.
6.For GUI check if Password and re-typed Password are identical (class UnmatchedExcpetion) Message The passwords do not match