Hi,
I am working on a project on a battleship game.
Requirement:
File handling:
A file is used to store user information to simulate register and login function.
Once the program starts
New user registration: enter user name (make sure it is unique), date of birth, password to store in the file
String operation
The password must meet the following common criteria:
• The length of the password is more than 8 characters
• At least one upper case letter
• At least one lower case letter
• At least one digit
• At least one special symbol (punctuation)
• Cannot contain user name
Exception handling for file operation
If the file cannot be found, need handle the exception. E.g., New text file will be created if there is no pre-existing file.
Existing user needs enter user name and password to login. User name and password must match the one stored in the file to login. The users can try three times before the account is locked. Once the account is locked, the user has to answer question to activate the account, in our system, the question is date of birth.
For the creating new username and password, how do i go about doing to fit the criteria as shown above?