Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace lab3
- {
- class Program
- {
- static void Main(string[] args)
- {
- Lista_studentow lista_ = new Lista_studentow();
- List<Student> list = new List<Student>();
- lista_.DodajStudenta(list);
- }
- }
- class Student
- {
- private string _imie;
- private string _nazwisko;
- private string _pesel;
- private string _dataUrodzenia;
- private string _grupy;
- public Student(string imie, string nazwisko, string pesel, string dataUrodzenia, string grupy)
- {
- _imie = imie;
- _nazwisko = nazwisko;
- _pesel = pesel;
- _dataUrodzenia = dataUrodzenia;
- _grupy = grupy;
- }
- public string toString()
- {
- return "tak";
- }
- }
- class Lista_studentow
- {
- public void DodajStudenta(List<Student> listaStudentow)
- {
- listaStudentow.Add(new Student(Console.ReadLine(), Console.ReadLine(), Console.ReadLine(), Console.ReadLine(),Console.ReadLine()));
- }
- public void UsunStudenta(List<Student> listaStudentow)
- {
- int index = 0; // tu podaj index
- listaStudentow.RemoveAt(index);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement