Ejemplo n.º 1
0
 public static List<UpdatedAssignment> updateAssignments(Student student, List<Assignment> assignments)
 {
     List<Assignment> stored = students[student];
     List<UpdatedAssignment> ret = new List<UpdatedAssignment>();
     foreach (Assignment assignment in stored)
     {
         foreach (Assignment check in assignments)
         {
             if (assignment.classwork.Equals(check.classwork))
             {
                 if (!assignment.Equals(check))
                 {
                     ret.Add(new UpdatedAssignment
                     {
                         oldAssignment = assignment,
                         newAssignment = check
                     });
                 }
             }
         }
     }
     students[student] = assignments;
     return ret;
 }
Ejemplo n.º 2
0
 public static void addStudent(Student student)
 {
     students[student] = new List<Assignment>();
 }