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; } }
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(); }
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(); }
public static Student RandomStudent() { Student tmp = new Student(RandomPerson(), Groups[Generator.Rand.Next(Groups.Length)]); tmp.Course = Generator.Rand.Next(1, 4); return tmp; }
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"); }