コード例 #1
0
        public void RegisterStudent()
        {
            Console.WriteLine("Registering of a new student");
            Console.Write("Type his/her name : ");
            string name = Console.ReadLine();

            Console.Write("Type his/her adress : ");
            string adress = Console.ReadLine();

            Console.Write("Type his/her phone number : ");
            string phoneNumber = Console.ReadLine();

            Console.Write("Type his/her email : ");
            string email = Console.ReadLine();

            Console.Write("Type his/her password : "******"Type the name of his/her branch : ");
            string branchName = Console.ReadLine();

            Console.Write("Type the number of payments : ");
            int nbrPayment = Convert.ToInt32(Console.ReadLine());

            int     index   = Branches.IndexOfKey(branchName);
            Branche branche = Branches.ElementAt(index).Value;

            Student student = new Student(name, adress, phoneNumber, email, password, branche, nbrPayment, 0, 0, 0, AllCourses[index], AllCourses[index].Count);

            AllStudents.Add(student);
        }