/**
  * Rejects an application submitted by a student by removing the selected room We can use the
  * request room method, as all it does is set the student's room as null
  */
 public void rejectApplication() {
   System.out.println("Rejected application of selected student");
   for (int i = 0; i < appliedStudents.length; i++) {
     if (appliedStudents[i].getName().equals(applicationSelected))
       acceptedStudent = appliedStudents[i];
   }
   emailBeanInstance.sendEmail(
       acceptedStudent.getEmail(),
       "Application for "
           + acceptedStudent.getFacility()
           + " Room: "
           + acceptedStudent.getRoomNum()
           + " REJECTED",
       "Were are sorry to inform you your application was rejected by the manager. Feel free to make another application whenever you please.");
   managerDriver.rejectRoomRequest(acceptedStudent.getUserName());
   appliedStudents = managerDriver.getAllRoomRequests();
 }
 /**
  * Change student's account type to resident Now is assigned to specific room uses driver method
  * to change just its user type
  */
 public void acceptApplication() {
   System.out.println("Accepted application of selected student");
   for (int i = 0; i < appliedStudents.length; i++) {
     if (appliedStudents[i].getName().equals(applicationSelected))
       acceptedStudent = appliedStudents[i];
   }
   emailBeanInstance.sendEmail(
       acceptedStudent.getEmail(),
       "Application for "
           + acceptedStudent.getFacility()
           + " Room: "
           + acceptedStudent.getRoomNum()
           + " ACCEPTED",
       "Were are pleased to inform you your application was accepted by the manager. Your move in data will be forwarded to you when it is available.");
   managerDriver.assignRoomToStudent(
       acceptedStudent.getFacility(), acceptedStudent.getRoomNum(), acceptedStudent.getUserName());
   appliedStudents = managerDriver.getAllRoomRequests();
 }
 /** call ManagerDriver method to return list of students who have applied */
 @PostConstruct
 public void init() {
   System.out.println("ApplicationsPage PostConstructor init called");
   appliedStudents = managerDriver.getAllRoomRequests();
 }