using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace zajecia4 { class Osoba { //pola klasy private int wiek;//jednak musi być dlatego warunek nie działał //właściwośći klasy public string Imie { get; set; } public string Nazwisko { get; set; } public string Adres { get; set; } public int Pesel { get; } public int Wiek { get { return wiek; } set { if (value>= 1 && value<= 120) wiek = value; } } //konstruktory public Osoba(string Imie, string Nazwisko, string Adres, int Pesel, int Wiek) { this.Imie = Imie; this.Nazwisko=Nazwisko; this.Adres = Adres; this.Pesel = Pesel; this.Wiek = Wiek; } } }