Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OOP
- {
- class Osoba
- {
- public string Imie
- {
- get;
- private set;
- }
- public string Nazwisko
- {
- get;
- private set;
- }
- public Adres AdresZamieszkania
- {
- get;
- private set;
- }
- public string PrzedstawSię()
- {
- return "Nazywam się " + this.Imie + ' ' + this.Nazwisko + '\n' + this.AdresZamieszkania.AdresWFormaciePocztowym + '\n';
- }
- public void UstawDane(string noweImie, string noweNazwisko, string nowaUlica, string nowyNumerDomu, string nowyNumerMieszkania, string nowyKodPocztowy,
- string noweMiasto, string nowePaństwo)
- {
- this.Imie = noweImie;
- this.Nazwisko = noweNazwisko;
- AdresZamieszkania = new Adres();
- AdresZamieszkania.UstawDane(nowaUlica, nowyNumerDomu, nowyNumerMieszkania, nowyKodPocztowy, noweMiasto, nowePaństwo);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement