This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| The User class Defines the properties for the Users to be stored in the Database. | |
| Each User has a valid Username verified by the UserCheck method and a valid | |
| Password verified by the PassCheck method. | |
| */ | |
| class User { | |
| private String username =""; //Creates an empty username | |
| private String password =""; //Creates an empty password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This program uses a driver class ValidateUser to get user input from the screen using the | |
| scanner class. The ValidateUser calls the UserCheck method that checks to see if the entered | |
| username is valid. The requirments for a valid username are as follows: | |
| 1) Username must contain only letters, numbers, @, underscores, and a period. | |
| 2) Username must be a valid email address | |
| If the username is valid the result will display "Valid Username" If not the result will | |
| display an appropriate error message. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This program uses a driver class ValidatePassword to get user input from the screen using the | |
| scanner class. The ValidatePassword calls the PassCheck method that checks to see if the entered | |
| password is valid. The requirments for a valid passwors are as follows: | |
| 1) Password must be at least 8 characters long. | |
| 2) Password must contain two capital letters. | |
| 3) Password must contain at least two numbers | |
| 4) Password contains only letters and number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This program uses a Driver class to get user commands from the keyboard. The following commands | |
| are valid and will produce the corresponding results: | |
| Add - Allows the user to add new users to the database by providing a valid | |
| username and password. | |
| Delete - Allows the user to remove users from the databse by providing a valid | |
| username, assuming the username has been previously added |