Example #1
0
        static void Main(string[] args)
        {
            MyDb        db          = new MyDb();
            Course      course      = new Course();
            Topic       topic       = new Topic();
            Expertise   expert      = new Expertise();
            Professor   professor   = new Professor();
            CourseTopic courseTopic = new CourseTopic();

            List <Professor>   professors   = db.GetProfessors();
            List <Course>      courses      = db.GetCourses();
            List <Topic>       topics       = db.GetTopics();
            List <Expertise>   experts      = db.GetExpertise();
            List <CourseTopic> courseTopics = db.GetCourseTopics();

            PrintData(courses, topics, professors, experts, courseTopics);
            GetWeightedTopics(courses, courseTopics);

            Analyser analyser = new Analyser();

            Console.WriteLine("");
            Console.WriteLine("----------- Result --------------");
            Dictionary <int, Dictionary <int, int> > dic = analyser.CreateCourseDictionary();
            List <int> profPerList = new List <int>();

            for (int courseID = 1; courseID < 12; courseID++)
            {
                profPerList = analyser.GetProfessorForCourse(courseID);
                Console.WriteLine("Course Id :{0} Professor {1} Percentage : {2}", courseID, profPerList[0], profPerList[1] / 100);
            }
            Console.ReadLine();
        }