public student() { id = -1; preferences = new sectionsList(); sectionGrade = new Dictionary <section, int>(); name = ""; }
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); }