Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Created by Adam on 07.11.2022.
- //
- #ifndef BIBLIOTEKA_BIBLIOTEKA_H
- #define BIBLIOTEKA_BIBLIOTEKA_H
- #include <string>
- #include <iostream>
- using namespace std;
- namespace Biblioteka {//namespace
- class Ksiazka {//klasa książka -> do niej dostaniesz się za pomocą Biblioteka::Ksiazka i mozesz jej składowe ogarnąć
- public:
- Ksiazka();
- Ksiazka(Biblioteka::Ksiazka const & ksiazka);
- Ksiazka(const string &tytul, const string &autor, int rokWydania);//nie potrzebne są const oraz & ( hamują przed wywołaniem się konstruktora kopiującego )
- //nie potrzebny jest & oraz const , const
- const string &getTytul() const;
- void setTytul(const string &tytul);
- const string &getAutor() const;
- void setAutor(const string &autor);
- int getRokWydania() const;
- void setRokWydania(int rokWydania);
- static int getLicznik();
- static void setLicznik(int licznik);
- // friend ostream &operator<<(ostream &os, const Ksiazka &ksiazka);
- // friend ostream &operator<<(ostream &os, const Ksiazka &ksiazka);
- bool czyWXXWieku();
- static int licznik;
- private:
- string tytul;
- string autor;
- int rokWydania{};
- };
- };
- #endif //BIBLIOTEKA_BIBLIOTEKA_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement