コード例 #1
0
 /**
  * Logs the teacher in if they have previously registered for a new account
  *
  * @param u String username
  * @param p char password
  */
 public void logInTeacher(String u, String p) {
   username = u;
   String pWord = p;
   if (dataBase.login(u, pWord)) {
     TeacherView t = new TeacherView(dataBase, u);
     screen.dispose();
   }
 }
コード例 #2
0
 /**
  * Logs a student in given a correct username and password
  *
  * @param u String username
  * @param p char password
  */
 public void logInStudent(String u, String p) {
   username = u;
   String pWord = p;
   if (dataBase.login(u, pWord)) {
     setupMainMenuUI();
   } else {
     System.out.println("Login Failed.");
   }
 }