Ejemplo n.º 1
0
 public c_Pojazd(c_Pojazd poj)
 {
     this.typ_pojazdu      = poj.typ_pojazdu;
     this.marka            = poj.marka;
     this.pojemnosc        = poj.pojemnosc;
     this.liczba_miejsc    = poj.liczba_miejsc;
     this.vin              = poj.vin;
     this.nr_rejestracyjny = poj.nr_rejestracyjny;
     this.rok_produkcji    = poj.rok_produkcji;
     this.kolor            = poj.kolor;
     this.nr_polisy        = poj.nr_polisy;
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Cwiczenie 1\n");

            c_Pojazd     pojazd1     = new c_Pojazd("van", "IVECO", 1.6, 3, "123456", "rejestr1", 2015, "biały", "12124");
            c_Wlasciciel wlasciciel1 = new c_Wlasciciel("Janusz", "Nosacz", "Kwiatowa 6", "527152671", "2164d", "12,12,12", 2016, 3);

            c_Pojazd     pojazd2     = new c_Pojazd("SUV", "TOYOTA", 3.6, 5, "7854397", "rej2", 2014, "Czarny", "73hofwe");
            c_Wlasciciel wlasciciel2 = new c_Wlasciciel("Beata", "Plizga", "Nowa 3", "89273508247", "wid9", "15.15.15", 2018, 17);

            c_Pojazd     pojazd3     = new c_Pojazd("GIT", "Citroen", 1.6, 5, "2452r23r", "rej3", 2005, "srebrny", "397ery390");
            c_Wlasciciel wlasciciel3 = new c_Wlasciciel("Gabriel", "Kowal", "Stara 7", "93278yr9", "f387y", "15.16.17", 2015, 0);

            Auto[] samochody = new Auto[3];

            samochody[0] = new Auto(pojazd1, wlasciciel1);
            samochody[1] = new Auto(pojazd2, wlasciciel2);
            samochody[2] = new Auto(pojazd3, wlasciciel3);


            IPoliceData[] police = new IPoliceData[3];

            police[0] = samochody[0];
            police[1] = samochody[1];
            police[2] = samochody[2];

            ICepikData[] cepik = new ICepikData[3];

            cepik[0] = samochody[0];
            cepik[1] = samochody[1];
            cepik[2] = samochody[2];

            IStatData[] stat = new IStatData[3];

            stat[1] = samochody[1];
            stat[2] = samochody[2];
            stat[0] = samochody[0];


            for (int i = 0; i < 3; i++)
            {
                Console.WriteLine(police[i].get_user_punkty_karne());
                Console.WriteLine(cepik[i].get_user_imie());
                Console.WriteLine(stat[i].get_car_marka() + "\n");
            }
        }
Ejemplo n.º 3
0
 public Auto(c_Pojazd poj, c_Wlasciciel wl)
 {
     pojazd     = new c_Pojazd(poj);
     wlasciciel = new c_Wlasciciel(wl);
 }