private void AddOldMath() { Degree math = new Degree("Math"); List <List <Course> > mathElectives = new List <List <Course> >(); Elective history = new Elective("history"); history.Courses.Add(new Course("US History", false, 3)); history.Courses.Add(new Course("Non Wester Civ", false, 3)); Elective music = new Elective("Music"); music.Courses.Add(new Course("Music 101", false, 3)); music.Courses.Add(new Course("Phys Ed", false, 3)); Elective english = new Elective("English"); history.Courses.Add(new Course("English", false, 3)); history.Courses.Add(new Course("English Lit", false, 3)); math.RequiredCourses.Add(new Course("Cal A", false, 3)); math.RequiredCourses.Add(new Course("Cal B", false, 3)); math.RequiredCourses.Add(new Course("Linear", false, 3)); math.RequiredCourses.Add(new Course("DiffEQ", false, 3)); math.RequiredCourses.Add(new Course("Physics", false, 3)); math.RequiredCourses.Add(new Course("English 101", false, 3)); math.RequiredCourses.Add(new Course("Western Civ", false, 3)); math.ElectiveCourses.Add(history); math.ElectiveCourses.Add(music); math.ElectiveCourses.Add(english); Degrees.Add(math); }
private bool ElectiveBeingTaken(Elective elective, Semester semester) { bool result = false; foreach (Course course in elective.Courses) { foreach (Course sCourse in semester.Courses) { if (sCourse.Name == course.Name) { return(true); } } } return(result); }
private void TestNew() { Degree math = new Degree("math"); math.RequiredCourses.Add(new Course("Cal A", false, 3)); math.RequiredCourses.Add(new Course("Cal B", false, 3, "Cal A")); math.RequiredCourses.Add(new Course("Linear", false, 3, "Cal B")); Elective english = new Elective("english"); english.Courses.Add(new Course("English 101", false, 3)); Elective phys = new Elective("phys"); english.Courses.Add(new Course("Physics 101", false, 3)); Elective civ = new Elective("western civ"); english.Courses.Add(new Course("Western Civ", false, 3)); Elective music = new Elective("music"); english.Courses.Add(new Course("Music Appreciation", false, 3)); Elective art = new Elective("art"); english.Courses.Add(new Course("Art History", false, 3)); math.ElectiveCourses.Add(english); math.ElectiveCourses.Add(phys); math.ElectiveCourses.Add(civ); math.ElectiveCourses.Add(art); math.ElectiveCourses.Add(music); Degrees.Add(math); }