Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. #pragma once
  2. class Author
  3. {
  4. char* name;
  5. int booksCount;
  6. char* nationality;
  7. void copy(char* name, int booksCount, char* nationality);
  8. void copy(const Author& author);
  9. void destroy();
  10.  
  11. public:
  12.  
  13. Author(char* name="Ivan",int booksCount=0,char* nationality="Bulgarian");
  14. ~Author();
  15. Author(const Author& author);
  16. Author& operator=(const Author& author);
  17. char* getName() const;
  18. void setName(char* name);
  19. int getBooksCount()const;
  20. void setBooksCount(int booksCount);
  21. char* getNationality()const;
  22. void setNationality(char* nationality);
  23. void print();
  24. bool operator<(const Author& author)const;
  25. bool operator>(const Author& author)const;
  26. bool operator<=(const Author& author)const;
  27. bool operator>=(const Author& author)const;
  28. bool operator!=(const Author& author)const;
  29. bool operator==(const Author& author)const;
  30. friend std::istream& operator>>(std::istream& is, Author& author);
  31. friend std::ostream& operator<<(std::ostream& os, const Author& author);
  32.  
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement