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/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("<Successful login>\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 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