Advertisement
Guest User

Adres

a guest
Oct 15th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.47 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace OOP
  8. {
  9.     class Adres
  10.     {
  11.         public string Ulica
  12.         {
  13.             get;
  14.             private set;
  15.         }
  16.         public string NumerDomu
  17.         {
  18.             get;
  19.             private set;
  20.         }
  21.         public string NumerMieszkania
  22.         {
  23.             get;
  24.             private set;
  25.         }
  26.         public string KodPocztowy
  27.         {
  28.             get;
  29.             private set;
  30.         }
  31.         public string Miasto
  32.         {
  33.             get;
  34.             private set;
  35.         }
  36.         public string Państwo
  37.         {
  38.             get;
  39.             private set;
  40.         }
  41.         public string AdresWFormaciePocztowym
  42.         {
  43.             get
  44.             {
  45.                 return "Ul. " + this.Ulica + ' ' + this.NumerDomu + '/' + this.NumerMieszkania + "\n" + this.KodPocztowy + ' ' + this.Miasto + '\n' + this.Państwo;
  46.             }
  47.         }
  48.  
  49.         public void UstawDane(string nowaUlica, string nowyNumerDomu, string nowyNumerMieszkania, string nowyKodPocztowy, string noweMiasto, string nowePaństwo)
  50.         {
  51.             this.Ulica = nowaUlica;
  52.             this.NumerDomu = nowyNumerDomu;
  53.             this.NumerMieszkania = nowyNumerMieszkania;
  54.             this.KodPocztowy = nowyKodPocztowy;
  55.             this.Miasto = noweMiasto;
  56.             this.Państwo = nowePaństwo;
  57.         }
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement