Gym2/src/gym/Login_form.java
//This functions to take ArrayList and id and password and check if this password and id is exist or no.
This functions to take ArrayList and id and password and check if this password and id is exist or no.
This functions to take ArrayList and id and password and check if this password and id is exist or no .
public boolean login_admin(ArrayList<Administrator> admin , int id , String pass)
    {
        boolean res = false;  
        for (int i = 0; i < admin.size(); i++) {
            if(id == admin.get(i).getId()& pass.equals( admin.get(i).getPassword()))
            {
                res =  true;
                break;
            }
            else
            {
                continue;
            }
        }
        return res;
    }
public boolean login_admin ( ArrayList < Administrator > admin , int id , String pass ) { boolean res = false ; for ( int i = 0 ; i < admin . size ( ) ; i ++ ) { if ( id == admin . get ( i ) . getId ( ) & pass . equals ( admin . get ( i ) . getPassword ( ) ) ) { res = true ; break ; } else { continue ; } } return res ; }
This functions to take ArrayList and id and password and check if this password and id is exist or no.
This functions to take ArrayList and id and password and check if this password and id is exist or no .