Пример #1
0
 public Promotion(string name, School school)
 {
     if (string.IsNullOrWhiteSpace(name))
     {
         throw new ArgumentException();
     }
     _name = name;
     _school = school;
     _listpupil = new Dictionary<string, Pupil>();
 }
Пример #2
0
        public Classroom(string name, School school)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException();
            }

            _name = name;
            _school = school;
        }
Пример #3
0
        public void save_and_reload()
        {
            string fName = Path.GetTempFileName();

            School sc = new School("Intech");
            sc.Save(fName);
            School sc2 = School.Load(fName);

            Assert.That(sc2.Name, Is.EqualTo(sc.Name));
        }
Пример #4
0
        public Teacher(string name, string firstname, School school)
        {
            if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(firstname))
            {
                throw new ArgumentException();
            }

            _name = name;
            _firstname = firstname;
            _school = school;
        }
Пример #5
0
        public Pupil(string name, string firstname, School school)
        {
            if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(firstname))
            {
                throw new ArgumentException();
            }

            _name = name;
            _firstname = firstname;
            _school = school;
            _listnote = _listnote = new Dictionary<string, int>();
        }
Пример #6
0
        public Course(string name, School school)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException();
            }

            _name = name;
            _school = school;
            _listteacher = new Dictionary<string, Teacher>();
            _listpromotion = new Dictionary<string, Promotion>();
        }