Advertisement
adwas33

Untitled

Nov 7th, 2022
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. //
  2. // Created by Adam on 07.11.2022.
  3. //
  4.  
  5. #ifndef BIBLIOTEKA_BIBLIOTEKA_H
  6. #define BIBLIOTEKA_BIBLIOTEKA_H
  7.  
  8. #include <string>
  9. #include <iostream>
  10.  
  11. using namespace std;
  12. namespace Biblioteka {//namespace
  13.  
  14. class Ksiazka {//klasa książka -> do niej dostaniesz się za pomocą Biblioteka::Ksiazka i mozesz jej składowe ogarnąć
  15. public:
  16. Ksiazka();
  17. Ksiazka(Biblioteka::Ksiazka const & ksiazka);
  18.  
  19. Ksiazka(const string &tytul, const string &autor, int rokWydania);//nie potrzebne są const oraz & ( hamują przed wywołaniem się konstruktora kopiującego )
  20.  
  21. //nie potrzebny jest & oraz const , const
  22. const string &getTytul() const;
  23.  
  24. void setTytul(const string &tytul);
  25.  
  26. const string &getAutor() const;
  27.  
  28. void setAutor(const string &autor);
  29.  
  30. int getRokWydania() const;
  31.  
  32. void setRokWydania(int rokWydania);
  33.  
  34. static int getLicznik();
  35.  
  36. static void setLicznik(int licznik);
  37.  
  38. // friend ostream &operator<<(ostream &os, const Ksiazka &ksiazka);
  39. // friend ostream &operator<<(ostream &os, const Ksiazka &ksiazka);
  40. bool czyWXXWieku();
  41. static int licznik;
  42. private:
  43. string tytul;
  44. string autor;
  45. int rokWydania{};
  46. };
  47.  
  48.  
  49. };
  50.  
  51.  
  52. #endif //BIBLIOTEKA_BIBLIOTEKA_H
  53.  
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement