Exemplo n.º 1
0
        private void entryButton_Click(object sender, EventArgs e)
        {
            int classRoom = (int)classroomCount.Value;
            Student tempStudent = new Student(firstNameBox.Text, lastNameBox.Text);
            firstNameBox.Clear();
            lastNameBox.Clear();
            classroomCount.ResetText();

            // rooms[classRoom - 1].AddStudent(tempStudent);

            //classList1 = rooms[1].Room;
            //classList2 = rooms[2].Room;
            //classList3 = rooms[3].Room;

            switch (classRoom)
            {
                case 1:
                    classList1.Items.Add(tempStudent);
                    break;
                case 2:
                    classList2.Items.Add(tempStudent);
                    break;
                case 3:
                    classList3.Items.Add(tempStudent);
                    break;
            }
        }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     string name = Console.ReadLine();
     string surname = Console.ReadLine();
     Double gpa = Convert.ToDouble(Console.ReadLine());// стринг ту дабл
     Student inf = new Student(name, surname, gpa);
     Console.WriteLine(inf);
     Console.ReadKey();
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            string name = Console.ReadLine();
            string surname = Console.ReadLine();
            Double gpa = Convert.ToDouble(Console.ReadLine());
            Student information = new Student(name, surname, gpa);

            Console.WriteLine(information);
            Console.ReadKey();
        }
Exemplo n.º 4
0
 public static Student RandomStudent()
 {
     Student tmp = new Student(RandomPerson(), Groups[Generator.Rand.Next(Groups.Length)]);
     tmp.Course = Generator.Rand.Next(1, 4);
     return tmp;
 }
Exemplo n.º 5
0
 public void AddStudent(Student student)
 {
     room.Items.Add(student);
 }
 public ChangeHeadCommand(Group group,
                          Student newHead) : base(group)
 {
     this.previousHead = group.Head;
     this.newHead      = newHead;
 }
 public AddStudentCommand(Group group,
                          Student student) : base(group)
 {
     this.newStudent = student ??
                       throw new ArgumentNullException("student");
 }