Ejemplo n.º 1
0
 public student()
 {
     id           = -1;
     preferences  = new sectionsList();
     sectionGrade = new Dictionary <section, int>();
     name         = "";
 }
Ejemplo n.º 2
0
        bool SwapStudents(sectionsList SwSeclist, student SwCurrentStudent, int SwCurrentSectionIndex, student SwTargetStudent, int SwTargetSectionIndex)
        {
            secList.ReurnSectionByindex(SwTargetSectionIndex).stdlist.addstudent(SwCurrentStudent);
            if (!secList.ReurnSectionByindex(SwTargetSectionIndex).stdlist.removeStudent(SwTargetStudent))
            {
                return(false);
            }

            secList.ReurnSectionByindex(SwCurrentSectionIndex).stdlist.addstudent(SwTargetStudent);
            if (!secList.ReurnSectionByindex(SwCurrentSectionIndex).stdlist.removeStudent(SwCurrentStudent))
            {
                return(false);
            }
            return(true);
        }