Exemplo n.º 1
0
        protected override AbstractCourse GetCourse(string courseName)
        {
            AbstractCourse abstractCourse = null;

            if (courseName.Equals("CJava", StringComparison.OrdinalIgnoreCase))
            {
                abstractCourse = new CJava();
            }
            else if (courseName.Equals("CNet", StringComparison.OrdinalIgnoreCase))
            {
                abstractCourse = new CNet();
            }
            return(abstractCourse);
        }
Exemplo n.º 2
0
        public static AbstractCourse CreateCourse(String courseName)
        {
            AbstractCourse abstractCourse = null;

            if (courseName.Equals("ONet", StringComparison.OrdinalIgnoreCase))
            {
                abstractCourse = new ONet();
            }
            else if (courseName.Equals("OJava", StringComparison.OrdinalIgnoreCase))
            {
                abstractCourse = new OJava();
            }
            else if (courseName.Equals("CJava", StringComparison.OrdinalIgnoreCase))
            {
                abstractCourse = new CJava();
            }
            else if (courseName.Equals("CNet", StringComparison.OrdinalIgnoreCase))
            {
                abstractCourse = new CNet();
            }
            abstractCourse.CreateCourseMaterial();
            abstractCourse.CreateCourseSchedule();
            return(abstractCourse);
        }