static void Addition(Statistics st) { // Students StudentElem BAI = new StudentElem("Berezin Alexey Ivanovich", new DateTime(1994, 1, 26)); StudentElem DRU = new StudentElem("Daineko Roman Urievich", new DateTime(1994, 10, 5)); StudentElem SNS = new StudentElem("Shaykhinurov Nail Shamilevich", new DateTime(1995, 1, 27)); StudentElem VMU = new StudentElem("Vymenets Maxim Yuryevich", new DateTime(1995, 10, 14)); StudentElem HDD = new StudentElem("Hohlova Daria Dmitrievna", new DateTime(1994, 11, 22)); // Student info StudentInfo BAI_info = new StudentInfo(BAI.FIO, 1); StudentInfo DRU_info = new StudentInfo(DRU.FIO, 2); StudentInfo SNS_info = new StudentInfo(SNS.FIO, 3); StudentInfo VMU_info = new StudentInfo(VMU.FIO, 4); StudentInfo HDD_info = new StudentInfo(HDD.FIO, 5); // Subjects SubjectElem matan = new SubjectElem("Matan", 1, 1, CREDIT.EXAM, "Dodonov"); SubjectElem algebra = new SubjectElem("Algebra", 1, 1, CREDIT.EXAM, "Shmidt"); SubjectElem history = new SubjectElem("History", 1, 1, CREDIT.TEST, "Nalivaiko"); SubjectElem po = new SubjectElem("Programming Foundation", 1, 1, CREDIT.EXAM, "Lavrov"); // Adding // BAI st.Add(BAI, matan, ASSESSMENT.GOOD); st.Add(BAI, algebra, ASSESSMENT.GOOD); st.Add(BAI, history, ASSESSMENT.PASSED); st.Add(BAI, po, ASSESSMENT.GOOD); // DRU st.Add(DRU, matan, ASSESSMENT.SATISFACTORY); st.Add(DRU, algebra, ASSESSMENT.GOOD); st.Add(DRU, history, ASSESSMENT.PASSED); st.Add(DRU, po, ASSESSMENT.EXCELLENT); // SNS st.Add(SNS, matan, ASSESSMENT.SATISFACTORY); st.Add(SNS, algebra, ASSESSMENT.SATISFACTORY); st.Add(SNS, history, ASSESSMENT.PASSED); st.Add(SNS, po, ASSESSMENT.SATISFACTORY); // VMU st.Add(VMU, matan, ASSESSMENT.GOOD); st.Add(VMU, algebra, ASSESSMENT.GOOD); st.Add(VMU, history, ASSESSMENT.PASSED); st.Add(VMU, po, ASSESSMENT.EXCELLENT); // HDD st.Add(HDD, matan, ASSESSMENT.GOOD); st.Add(HDD, algebra, ASSESSMENT.GOOD); st.Add(HDD, history, ASSESSMENT.PASSED); st.Add(HDD, po, ASSESSMENT.EXCELLENT); st.AddInfo(BAI_info); st.AddInfo(DRU_info); st.AddInfo(SNS_info); st.AddInfo(VMU_info); st.AddInfo(HDD_info); }
public void AddInfo(StudentInfo info) { if (_DataBase.Find(info.FIO) == null) _DataBase.Add(info); }
public StudentInfoEnumerator(StudentInfo[] list) { info = list; }
public StudentInfo(StudentInfo info) { FIO = info.FIO; ID = info.ID; }
public void Add(StudentInfo info) { data_base[count] = new StudentInfo(info); count++; if (count == max_count) { StudentInfo[] temp = data_base; max_count += 10; data_base = new StudentInfo[max_count]; for (int i = 0; i < temp.Length; i++) data_base[i] = temp[i]; } }