Skip to content

Instantly share code, notes, and snippets.

View BasementProgramming's full-sized avatar

Daniel Thomas BasementProgramming

View GitHub Profile
@BasementProgramming
BasementProgramming / User.java
Last active March 29, 2017 20:32
Defining a User for our simple database.
/*
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
@BasementProgramming
BasementProgramming / ValidateUser.java
Last active March 30, 2017 14:14
Simple program for validating that the username input entered by the user meets the given criteria.
/*
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.
@BasementProgramming
BasementProgramming / ValidatePassword.java
Last active August 14, 2023 19:13
Simple program for validating that a password input entered by the user meets the given criteria.
/*
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
@BasementProgramming
BasementProgramming / Driver.java
Last active March 30, 2017 14:24
The Driver Class for initiating database commands.
/*
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