Question: Write a program named ValidateNewCredentials that simulates the creation of a user's handle and password. A valid user handle is between 3 to 1 4
Write a program named ValidateNewCredentials that simulates the creation of a user's handle and password.
A valid user handle is between to characters long with only letters, numbers, and underscores.
A valid password must:
be at least characters in length
have at least alpha and numeric character
have at least special character
not include a space
Your program will prompt the user for the handle, and if the handle is not in a valid format, continue prompting the user until it is valid. When a valid handle is entered, prompt the user to enter their password. If the chosen password is valid, inform the user of the successful account creation. If not, inform the user that the password is invalid and continue prompting the user until it is valid and the account is successfully created.
Include methods:
validateHandle: accepts the entered handle and returns true if it is a valid handle
validatePassword: accepts the entered password and returns true if it is a valid password
Sample output :
Enter your handle:
Al
Invalid handle, enter another:
Alexa?
Invalid handle, enter another:
Alexa
Create a password:
heyGgle!
Account created successfully.
Sample output :
Enter your handle:
lord voldemort
Invalid handle, enter another:
voldy
Create a password:
avadakadavra
Invalid password, enter another:
let's see does this work
Invalid password, enter another:
thisshouldwork#
Account created successfully.
JAVA QUESTION
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
