Write a static method isValidPassword() that checks whether a string is a valid password. The method gets a string as an input and it returns true if and only if the string is a valid password, and...


Can you write code according to the desired conditions ?


Write a static method isValidPassword() that checks whether a string is a valid password. The method<br>gets a string as an input and it returns true if and only if the string is a valid password, and false<br>otherwise.<br>Password rules:<br>1. A password must have at least ten characters.<br>2. A password must contain at least two upper case letters.<br>3. A password must contain at least one lower case letter.<br>4. A password must contain at least two digits.<br>1<br>5. A password must contain only one symbol.<br>Part-2:<br>Please enter a password: Javaclass102<br>False.

Extracted text: Write a static method isValidPassword() that checks whether a string is a valid password. The method gets a string as an input and it returns true if and only if the string is a valid password, and false otherwise. Password rules: 1. A password must have at least ten characters. 2. A password must contain at least two upper case letters. 3. A password must contain at least one lower case letter. 4. A password must contain at least two digits. 1 5. A password must contain only one symbol. Part-2: Please enter a password: Javaclass102 False. "Javaclass102" is not a valid password. Part-2: Please enter a password: JavaClass102@ True. Password is valid.

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here