コード例 #1
0
ファイル: Mark.cs プロジェクト: 3A9C/ITstep
 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;
 }
コード例 #2
0
ファイル: Mark.cs プロジェクト: a-pinch/andrewtroyan
 // constructors
 public Mark()
 {
     point = default(int);
     markGround = default(MarkGround);
     pupil = default(Pupil);
     pupilID = default(int);
     teacher = default(Teacher);
     teacherID = default(int);
 }
コード例 #3
0
ファイル: Mark.cs プロジェクト: a-pinch/andrewtroyan
        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_;
        }
コード例 #4
0
        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();
        }
コード例 #5
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();
        }
コード例 #6
0
ファイル: Teacher.cs プロジェクト: irinalesina/ITStepProjects
 public Mark PutMark(Pupil pupil, String for_what, int value)
 {
     return new Mark(this, pupil, for_what, value);
 }
コード例 #7
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();
        }
コード例 #8
0
 public Mark()
 {
     pupil    = default(Pupil);
     teacher  = default(Teacher);
     for_what = default(string);
 }