コード例 #1
0
ファイル: Lesson.cs プロジェクト: 3A9C/ITstep
 public Lesson(Subject subject, string theme, Teacher teacher, PupilsGroup pupil_group)
 {
     this.subject = subject;
     this.topic = theme;
     this.teacher = teacher;
     this.pupil_group = pupil_group;
     marks = new List<Mark>();
 }
コード例 #2
0
 public Lesson(Subject subject, string theme, Teacher teacher, PupilsGroup pupil_group)
     : this()
 {
     this.topic       = theme;
     this.teacher     = teacher;
     this.subject     = subject;
     this.pupil_group = pupil_group;
     this.nameGr      = pupil_group.name;
     this.teacherID   = teacher.TeacherID;
 }
コード例 #3
0
        public Lesson()
        {
            topic       = default(string);
            nameGr      = default(string);
            teacher     = default(Teacher);
            subject     = default(Subject);
            teacherID   = default(int);
            pupil_group = default(PupilsGroup);

            marks = new List <Mark>();
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: 3A9C/ITstep
        static void Main(string[] args)
        {
            Teacher teacher = new Teacher("Maks");
            Pupil pupil1 = new Pupil("Andrew");
            Pupil pupil2 = new Pupil("Kolya");
            Pupil pupil3 = new Pupil("Olya");
            Pupil pupil4 = new Pupil("Ira");

            PupilsGroup pupils_group = new PupilsGroup("P11014");
            pupils_group.pupils.Add(pupil1);
            pupils_group.pupils.Add(pupil2);
            pupils_group.pupils.Add(pupil3);
            pupils_group.pupils.Add(pupil4);

            Subject subject = new Subject("C#");
            subject.topics.Add("Binary and xml serializations");
            subject.topics.Add("Global project");

            Lesson lesson1 = new Lesson(subject, subject.topics[0], teacher, pupils_group);
            lesson1.ManageLesson();

            Console.ReadLine();
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: irinalesina/ITStepProjects
        static void Main(string[] args)
        {
            List<Teacher> teachers = new List<Teacher>();
            List<PupilsGroup> pupilGroups = new List<PupilsGroup>();

            Teacher Max = new Teacher("Max");
            Max.login = "******";
            Max.password = "******";
            teachers.Add(Max);

            Pupil pupil1 = new Pupil("Andrew");
            Pupil pupil2 = new Pupil("Kolya");
            Pupil pupil3 = new Pupil("Olya");
            Pupil pupil4 = new Pupil("Ira");

            PupilsGroup pupils_group1 = new PupilsGroup("P11014");
            pupils_group1.pupils.Add(pupil1.pupilId, pupil1);
            pupils_group1.pupils.Add(pupil2.pupilId, pupil2);
            pupils_group1.pupils.Add(pupil3.pupilId, pupil3);
            pupils_group1.pupils.Add(pupil4.pupilId, pupil4);

            pupilGroups.Add(pupils_group1);

            Subject subject = new Subject("C#");
            subject.topics.Add("Binary and xml serializations");
            subject.topics.Add("Global project");

            Lesson lesson1 = new Lesson(subject, subject.topics[0], Max, pupils_group1);
            lesson1.ManageLesson();

            Teacher Alex = new Teacher("Alex");
            Alex.login = "******";
            Alex.password = "******";
            teachers.Add(Alex);

            Pupil pupil11 = new Pupil("Jon");
            Pupil pupil22 = new Pupil("Brad");
            Pupil pupil33 = new Pupil("Josh");
            Pupil pupil44 = new Pupil("Katrin");

            PupilsGroup pupils_group2 = new PupilsGroup("P11015");
            pupils_group2.pupils.Add(pupil11.pupilId, pupil11);
            pupils_group2.pupils.Add(pupil22.pupilId, pupil22);
            pupils_group2.pupils.Add(pupil33.pupilId, pupil33);
            pupils_group2.pupils.Add(pupil44.pupilId, pupil44);

            pupilGroups.Add(pupils_group2);

            Lesson lesson2 = new Lesson(subject, subject.topics[0], Alex, pupils_group2);
            //lesson2.ManageLesson();

            List<Lesson> lessons = new List<Lesson>();
            lessons.Add(lesson1);
            lessons.Add(lesson2);

            XML<List<PupilsGroup>>.Serialize(path + "pupilGroups.xml", pupilGroups);

            XML<List<Lesson>>.Serialize(path + "lessons.xml", lessons);

            XML<List<Teacher>>.Serialize(path + "teachers.xml", teachers);

            Console.ReadLine();
        }