public void EnrollmentCalcGrade() { Department comc = this.school.FindDepartment("COMC"); Course comc2750 = new Course(100003, "2750", "UML Modeling and Iterative Process", 2, comc); Term term2020spr = school.FindTerm(2020, TermsEnum.Spr); Section section2750_2020spr = new Section(100002, 24, comc2750, term2020spr); // Add Assignments new Assignment(10000001, "1A", "Worksheet, identify student grade info classes", 10, DateTime.Parse("1/23/2020"), AssignmentTypesEnum.E, section2750_2020spr); new Assignment(10000002, "1B", "UML domain model, library books", 10, DateTime.Parse("1/29/2020"), AssignmentTypesEnum.E, section2750_2020spr); new Assignment(10000003, "1C", "UML Student Info domain model w/associations", 10, DateTime.Parse("1/30/2020"), AssignmentTypesEnum.E, section2750_2020spr); new Assignment(10000004, "1D", "Modify 1B (Library system): add attributes & operations", 10, DateTime.Parse("2/1/2020"), AssignmentTypesEnum.E, section2750_2020spr); new Assignment(10000005, "Q1", "Quiz 1", 50, DateTime.Parse("2/2/2020"), AssignmentTypesEnum.Q, section2750_2020spr); // Add enrollments new Enrollment(10000003, GradeTypesEnum.AF, GradesEnum.Z, school.FindStudent(10000015), section2750_2020spr); // Add AssignmentGrades new AssignmentGrade(10000003, 8, DateTime.Parse("1/22/2019"), section2750_2020spr.FindEnrollment(10000015), section2750_2020spr.FindAssignment("1A")); new AssignmentGrade(10000010, 8, DateTime.Parse("1/25/2019"), section2750_2020spr.FindEnrollment(10000015), section2750_2020spr.FindAssignment("1B")); new AssignmentGrade(10000016, 8, DateTime.Parse("1/29/2019"), section2750_2020spr.FindEnrollment(10000015), section2750_2020spr.FindAssignment("1C")); new AssignmentGrade(10000018, 10, DateTime.Parse("1/26/2019"), section2750_2020spr.FindEnrollment(10000015), section2750_2020spr.FindAssignment("1D")); new AssignmentGrade(10000020, 46, DateTime.Parse("1/26/2019"), section2750_2020spr.FindEnrollment(10000015), section2750_2020spr.FindAssignment("Q1")); Enrollment enr = section2750_2020spr.FindEnrollment(10000015); GradesEnum grade = enr.CalcGrade(); Assert.AreEqual(GradesEnum.B, grade); }