From 26a9729ff0ffd4cebd1e5cfa981cb44cc9e322d8 Mon Sep 17 00:00:00 2001 From: Alina Zacaria Date: Fri, 29 Nov 2024 20:02:58 -0600 Subject: [PATCH 1/2] created login class --- LogIn.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LogIn.java diff --git a/LogIn.java b/LogIn.java new file mode 100644 index 0000000..0146919 --- /dev/null +++ b/LogIn.java @@ -0,0 +1,22 @@ +import javax.swing.*; + +public class LogIn { + public Guest logIn() { + try {UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");} + catch (Exception e) {System.out.println("Look and Feel not set");} + + LoginPage loginPage = new LoginPage(null); + Guest guest = loginPage.guest; + + if(guest != null) { + System.out.println("\n\t" + + guest.getName() + + "\n\tID: " + guest.id_number + + "\n\tPassword: " + guest.password + + "\n\tStatus: " + guest.guest_status); + }else{ + System.out.println("Authentication Cancelled"); + } + return guest; + } +} \ No newline at end of file From 2b7c88d53bae61a42cc12fa044b2ebb89cf8d9f0 Mon Sep 17 00:00:00 2001 From: Alina Zacaria Date: Fri, 29 Nov 2024 23:29:11 -0600 Subject: [PATCH 2/2] added status enumerator --- Hello.java | 5 ----- Status.java | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 Hello.java create mode 100644 Status.java diff --git a/Hello.java b/Hello.java deleted file mode 100644 index 4bfad38..0000000 --- a/Hello.java +++ /dev/null @@ -1,5 +0,0 @@ -class Hello { - public static void main(String[] args) { - System.out.println("hello world"); - } -} \ No newline at end of file diff --git a/Status.java b/Status.java new file mode 100644 index 0000000..8ba12e2 --- /dev/null +++ b/Status.java @@ -0,0 +1,4 @@ +public enum Status { + STAFF, + CLUB_MANAGER +} \ No newline at end of file