Exemple #1
0
 public Mark(Teacher teacher, Pupil pupil, string for_what, int value)
 {
     this.teacher = teacher;
     this.pupil = pupil;
     this.for_what = for_what;
     this.value = value;
 }
Exemple #2
0
 // constructors
 public Mark()
 {
     point = default(int);
     markGround = default(MarkGround);
     pupil = default(Pupil);
     pupilID = default(int);
     teacher = default(Teacher);
     teacherID = default(int);
 }
Exemple #3
0
        public Mark(int point_, Pupil pupil_, Teacher teacher_, MarkGround markGround_)
        {
            if (point_ < 1 || point_ > 10)
            {
                throw new ArgumentOutOfRangeException("In Mark.Mark(int, Pupil, Teacher, MarkGround): the point is out of range.");
            }

            point = point_;
            pupil = pupil_;
            pupilID = pupil_.PupilID;
            teacher = teacher_;
            teacherID = teacher_.TeacherID;
            markGround = markGround_;
        }
        private void buttonStartLesson_Click(object sender, EventArgs e)
        {
            Lesson new_lesson = new Lesson();
            new_lesson.subject = new Subject("Mathematics");
            new_lesson.topic = "topic 1";

            Pupil pupil1 = new Pupil("Tim");
            Pupil pupil2 = new Pupil("Alex");
            Pupil pupil3 = new Pupil("Jon");
            Pupil pupil4 = new Pupil("Cindy");

            new_lesson.pupil_group = new PupilsGroup("Group 1");
            new_lesson.pupil_group.pupils.Add(pupil1.pupilId, pupil1);
            new_lesson.pupil_group.pupils.Add(pupil2.pupilId, pupil2);
            new_lesson.pupil_group.pupils.Add(pupil3.pupilId, pupil3);
            new_lesson.pupil_group.pupils.Add(pupil4.pupilId, pupil4);

            new_lesson.teacher = State.teachers[0];

            StartLesson startLesson = new StartLesson(new_lesson);
            startLesson.Show();
        }
Exemple #5
0
        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();
        }
 public Mark PutMark(Pupil pupil, String for_what, int value)
 {
     return new Mark(this, pupil, for_what, value);
 }
        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();
        }
Exemple #8
0
 public Mark()
 {
     pupil    = default(Pupil);
     teacher  = default(Teacher);
     for_what = default(string);
 }