Do not use regular expressions in your solution for this exercise. Write a program that checks to see if an input password is valid or not. In this exercise, a valid password has the following...


Do not use regular expressions in your solution for this exercise.

Write a program that checks to see if an input password is valid or not. In this exercise, a valid password has the following characteristics:




    • It contains at least eight characters.

    • It contains at most 12 characters.

    • It contains only alphabetic characters, digits and the underscore (‘_’) character.

    • It does not start with a digit.

    • It has a mix of upper-case and lower-case characters.




Your class must contain the following method:

public static String checkPassword(String input)


This method receives a possible password as input and returns only the String“OK” if the password is valid. If the password is not valid then you can return the reason(s) for that as the return value. This is not a part of the requirements, however, and you don’t need to do that. You can simply return null for an invalid password.



Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here