Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C3SC-71 - Create System Class #16

Merged
merged 3 commits into from
Nov 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Hello.java

This file was deleted.

22 changes: 22 additions & 0 deletions LogIn.java
Original file line number Diff line number Diff line change
@@ -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;
}
}
14 changes: 14 additions & 0 deletions SoftEngHealthClubSystem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
public class SoftEngHealthClubSystem {

public Guest user;

public SoftEngHealthClubSystem(Guest g) {

user = g;
try {UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");}
catch (Exception e) {System.out.println("Look and Feel not set");}

HealthClubHomePage homePage = new HealthClubHomePage(null, user);
homePage.welcomeText.setText("Welcome " + user.getName());
}
}
4 changes: 4 additions & 0 deletions Status.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public enum Status {
STAFF,
CLUB_MANAGER
}