Advertisement
nolog1n

bookstore

Feb 13th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. // book store
  5. struct Book {
  6. int id;
  7. std::string name;
  8. int year;
  9. int price;
  10. };
  11.  
  12.  
  13. class BookStore {
  14. public:
  15. Book* getById() const;
  16. void write(const Book& book);
  17. void add(const Book& book);
  18. };
  19.  
  20. class Driver {
  21. BookStore store;
  22. public:
  23. void loop();
  24. bool processCommand(std::string& str);
  25.  
  26. };
  27.  
  28.  
  29. int main(int argc, char** argv) {
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement