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 3 to 14 characters long with only letters, numbers, and underscores.
A valid password must:
be at least 8 characters in length
have at least 1 alpha and 1 numeric character
have at least 1 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 2 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 1:
Enter your handle:
Al
Invalid handle, enter another:
Alexa?
Invalid handle, enter another:
Alexa
Create a password:
heyG00gle!
Account created successfully.
Sample output 2:
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:
this1shouldwork#
Account created successfully.
JAVA QUESTION

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!