Advertisement
Guest User

Untitled

a guest
May 16th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.12 KB | None | 0 0
  1. class TabOsoba;
  2.  
  3. class Osoba {
  4. protected:
  5.     char * nazwisko;
  6.     int wiek;
  7.  
  8. public:
  9.     Osoba() {
  10.         nazwisko = NULL;
  11.     }
  12.     Osoba(char * name, int age);
  13.     Osoba(Osoba & wzorzec);
  14.     ~Osoba() {
  15.         delete[] nazwisko;
  16.     }
  17.  
  18.     void Wypisz();
  19.  
  20.     bool operator!=(Osoba & wzor);
  21.     Osoba & operator=(Osoba & wzor);
  22.     ostream & operator<<(ostream & Wyjscie);
  23.  
  24.     friend class TabOsoba;
  25.     friend ostream & operator<<(ostream & Wyjscie, const Osoba & osoba);
  26. };
  27.  
  28. class TabOsoba {
  29. private:
  30.     int rozmiar;
  31.     Osoba * Tab;
  32.     int licznik;
  33.  
  34. public:
  35.     TabOsoba();
  36.     TabOsoba(int r);
  37.     TabOsoba(TabOsoba & wzor);
  38.     ~TabOsoba() {
  39.         delete[] Tab;
  40.     }
  41.  
  42.     void DodajOsobe(char * name, int age);
  43.     void DodajOsobe();
  44.     void DodajOsobe(Osoba & wzor);
  45.  
  46.     int PodajRozmiar();
  47.     void WypiszTablice();
  48.     bool Szukaj(char * name, TabOsoba & SzukaneOsoby);
  49.  
  50.     Osoba & operator[](int i);
  51. };
  52.  
  53. class Student
  54.     : protected virtual Osoba
  55. {
  56. private:
  57.     int nr_albumu;
  58.     int rok_studiow;
  59. };
  60.  
  61. class Pracownik
  62.     : protected virtual Osoba
  63. {
  64. private:
  65.     char stanowisko[32];
  66.     double pensja;
  67. };
  68.  
  69. class StudenPracujacy
  70.     : public Student, public Pracownik
  71. {
  72.  
  73. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement