Exemplo n.º 1
0
        public AcademicTermViewModel(AcademicTerm term)
        {
            this.term = term;

            // TODO: DELETE
            var course1 = new Course()
            {
                DeptNumber      = "CS 5800",
                Name            = "Algorithms and Data",
                Instructor      = "Rajmohan Rajaraman",
                GoalModeEnabled = true,
                GoalEarned      = 80
            };

            term.AddCourse(course1);

            courses = new ObservableCollection <CourseViewModel>();
            foreach (var course in term.Courses)
            {
                courses.Add(new CourseViewModel(course));
            }
        }
Exemplo n.º 2
0
        public void Test3()
        {
            var term = new AcademicTerm()
            {
                School = "Northeastern University",
                Term = "Fall",
                Year = 2016
            };

            var course = new Course()
            {
                DeptNumber = "CS 5800",
                Name = "Algorithms and Data",
                Instructor = "Rajmohan Rajaraman",
                GoalModeEnabled = true,
                GoalEarned = 80
            };
            term.AddCourse(course);

            var midterms = new Section()
            {
                Name = "Midterms",
                Weight = .35
            };
            course.AddSection(midterms);

            var final = new Section()
            {
                Name = "Final",
                Weight = .65
            };
            course.AddSection(final);

            var a1 = new Assignment(1)
            {
                Name = "Midterm 1",
                Earned = 65,
                Worth = 100
            };
            midterms.AddAssignment(a1);

            var a2 = new Assignment(2)
            {
                Name = "Midterm 2",
                Earned = 90,
                Worth = 100
            };
            midterms.AddAssignment(a2);

            var a3 = new Assignment(3)
            {
                Name = "Midterm 3",
                Earned = 0,
                Worth = 100,
                GoalSelected = true
            };
            midterms.AddAssignment(a3);

            var a4 = new Assignment(4)
            {
                Name = "Final 1",
                Earned = 95,
                Worth = 100
            };
            final.AddAssignment(a4);

            var a5 = new Assignment(5)
            {
                Name = "Final 2",
                Earned = 0,
                Worth = 100,
                GoalSelected = true
            };
            final.AddAssignment(a5);

            var a6 = new Assignment(6)
            {
                Name = "Final 3",
                Earned = 0,
                Worth = 100,
                GoalSelected = true
            };
            final.AddAssignment(a6);

            course.CalculateGoals(ObjectiveType.Weighted);
        }