Question: Write a program named Account SignUp that simulates the creation of account credentials. Your program will first prompt the user their username, and if the



Write a program named Account SignUp that simulates the creation of account credentials. Your program will first prompt the user their username, and if the username is in a valid format, prompt the user to enter a password. A valid username is between 3 to 16 characters long with only letters, numbers and underscores. A valid password must: - be at least 8 characters length - have at least 1 letter and 1 number have at least 1 special character not include a space If the chosen password is valid, inform the user of the successful account creation. If not, inform the user of why the password is invalid. If the user enters an invalid username, simply inform them with a message and end the program. Sample output 1: Enter a username: harry_7 Enter a password: kill!Voldy777 Account created successfully End of program Sample output 2: Enter a username: harry_7 Enter a password: iheartginny Invalid password - must contain at least 1 number - must contain at least 1 special character End of program Sample output 3: Enter a username: harry_7 Enter a password: ron :) Invalid password - must be at least 8 characters in length must not contain a space must contain at least 1 number End of program Sample output 4: Enter a username: harry&dobby A username must be 3-16 characters in length and only contain letters, numbers, and underscores. End of program Sample output 4: Enter a username: harry&dobby A username must be 3-16 characters in length and only contain letters, numbers, and underscores. End of program Notes: Your code must contain a method named validateUsername that accepts a string as input and returns a boolean result of the validation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
