Skip to content

Commit 0b25139

Browse files
committed
Added the required objects and wrote some code
1 parent 26632a1 commit 0b25139

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public class UserRegLoginButton {
2+
}
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
public class UserRegistrationUI {
1+
import javax.swing.*;
2+
3+
public class UserRegistrationUI implements UserRegistrationUseCase{
4+
UserDatabase database = new UserDatabase();
5+
void GetUserCredentials(){
6+
JFrame RegisterFrame = new JFrame();
7+
JPanel RegisterPanel = new JPanel();
8+
9+
}
10+
@Override
11+
public void registerUser(String username, String password, String email) {
12+
if(database.userExists(username, password, email)){
13+
System.out.println("The username or password is already in use, please try again");
14+
}else{
15+
database.createUser(username, password, email, "Basic");
16+
System.out.println("Your account has been created, please verify to login");
17+
}
18+
}
219
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
public class UserRegistrationUseCase {
2-
1+
public interface UserRegistrationUseCase {
2+
void registerUser(String username, String password, String email);
33
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public class UserVerificationUI implements UserVerifier{
2+
3+
}

src/main/java/UserVerifier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public interface UserVerifier {
2+
void verify(UserDatabase database, String username);
3+
}

0 commit comments

Comments
 (0)