Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.81 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 ConsoleApplication3
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Wiza wiza = new Wiza();
  14.  
  15.  
  16.             Console.ReadKey();
  17.  
  18.             wiza.wypelnienieWniosku();
  19.         }
  20.     }
  21.  
  22.     class Klient
  23.     {
  24.         protected int IDKlienta;
  25.         protected string imieNazwisko, adresZamieszkania, dataUrodzenia, Obywatelstwo, kodPocztowy, Miasto;
  26.     }
  27.  
  28.     class RezerwacjaHotelu
  29.     {
  30.         string NazwaHotelu;
  31.         int NumerRezerwacji;
  32.         int IloscMiejsc;
  33.         string DataPrzyjazdu;
  34.         string DataWyjazdu;
  35.     }
  36.  
  37.     class RezerwacjaLotu
  38.     {
  39.         int NumerLotu;
  40.         string NazwaLiniiLotniczych;
  41.         int IloscMiejsc;
  42.         string DataLotu;
  43.         int NumerZlecenia;
  44.         string MiejsceWylotu;
  45.         string MiejsceDocelowe;
  46.     }
  47.  
  48.     class Agent
  49.     {
  50.         int IDAgenta;
  51.         string imieNazwisko;
  52.         string nrTelefonu;
  53.     }
  54.  
  55.     class Sekretarka
  56.     {
  57.         int IDSekretarki;
  58.         string imieNazwisko;
  59.     }
  60.  
  61.     class Wiza : Klient
  62.     {
  63.         bool paszport = true;
  64.         int iloscWymaganychDokumentow = 1;
  65.         //
  66.         string[] Rodzaje = {"turystyczna", "biznesowa", "prywatna", "tranzytowa", "pracownicza", "naukowa", "sportowa", "dziennikarska"};
  67.         string RodzajWizy;
  68.         string Kraj;
  69.         string CelPodrozy;
  70.         string dataPrzyjazdu;
  71.         string dataWyjazdu;
  72.         //
  73.         int nrZlecenia;
  74.  
  75.         public bool kompletnoscDokumentow()
  76.         {
  77.             if (iloscWymaganychDokumentow == 1)
  78.             {
  79.                 Console.WriteLine("Dokumenty kompletne.");
  80.                 return true;
  81.             }
  82.             else
  83.                 Console.WriteLine("Dokumenty nie są kompletne.");
  84.             return false;
  85.         }
  86.  
  87.         public bool czyDostarczonoDokumenty()
  88.         {
  89.             if (paszport == true)
  90.             {
  91.                 Console.WriteLine("Dostarczono dokumenty.");
  92.                 return true;
  93.             }
  94.             else
  95.             {
  96.                 Console.WriteLine("Nie dostarczono dokumentów.");
  97.                 return false;
  98.             }
  99.         }
  100.         public void wypelnienieWniosku()
  101.         {
  102.             if ((czyDostarczonoDokumenty()) && (kompletnoscDokumentow()))
  103.             {
  104.                 Console.WriteLine("Podaj imie i nazwisko: ");
  105.                 imieNazwisko = Console.ReadLine();
  106.  
  107.                 Console.WriteLine("Podaj adres zamieszkania: ");
  108.                 adresZamieszkania = Console.ReadLine();
  109.  
  110.                 Console.WriteLine("Podaj date urodzenia: ");
  111.                 dataUrodzenia = Console.ReadLine();
  112.  
  113.                 Console.WriteLine("Podaj obywatelstwo: ");
  114.                 Obywatelstwo = Console.ReadLine();
  115.  
  116.                 Console.WriteLine("Podaj kod pocztowy: ");
  117.                 kodPocztowy = Console.ReadLine();
  118.  
  119.                 Console.WriteLine("Podaj miasto: ");
  120.                 Miasto = Console.ReadLine();
  121.             }
  122.         }
  123.  
  124.         public Wiza()
  125.         {
  126.  
  127.             Console.WriteLine("Wpisz kraj, do którego chcesz otrzymać wizę: ");
  128.             Kraj = Console.ReadLine();
  129.  
  130.             Console.WriteLine("Wybierz rodzaj wizy: ");
  131.  
  132.             foreach (string show in Rodzaje)
  133.             Console.WriteLine(show);
  134.  
  135.             RodzajWizy = Console.ReadLine();
  136.  
  137.             Console.WriteLine("Podaj cel podróży: ");
  138.             CelPodrozy = Console.ReadLine();
  139.  
  140.             Console.WriteLine("Podaj date przyjazdu: ");
  141.             dataPrzyjazdu = Console.ReadLine();
  142.  
  143.             Console.WriteLine("Podaj date wyjazdu: ");
  144.             dataWyjazdu = Console.ReadLine();
  145.         }
  146.     }
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement