Advertisement
Guest User

Untitled

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