public static AbstractCourse CreateCourse(string selection)
        {
            AbstractCourse course = null;

            if (selection == "CJavaCourse")
            {
                course = new CJavaCourse();
            }
            else if (selection == "CNetCourse")
            {
                course = new CNetCourse();
            }
            return(course);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }