public class StudentsBiz {
    private List myList = new ArrayList();
    public StudentsBiz() {
    }
    public boolean addStu(Students stu){
        myList.add(stu);
        return true;
    }
    public boolean updateStu(Students stu){
        for (int i = 0; i < myList.size(); i++) {
            Students stus = (Students)myList.get(i);
            if(stus.getName().equals(stu.getName())){
                myList.set(i, stu);
                return true;
            }
        }
      return false;    
    }
    public void deleteStu(String name){
        for (int i = 0; i < myList.size(); i++) {
            Students stus = (Students)myList.get(i);
            if(stus.getName().equals(name)){
                myList.remove(i);
            }
        }
    }
    public List getList(){
        return myList;
    }
}