Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Library.cpp : This file contains the 'main' function. Program execution begins and ends there.
- //
- #include <iostream>
- #include <ostream>
- #include <string>
- const std::string filename = "Output.dat";
- using namespace std;
- class Book {
- private:
- string author_name, date;
- bool is_available;
- public:
- Book(string author_name, string date, bool is_available);
- Book();
- Book(const Book& other);
- string get_author_name() const;
- void set_author_name(string author_name);
- string get_date() const;
- void set_date(string date);
- bool get_is_available() const;
- void set_is_available(bool is_available);
- void set_book(string author_name, string date, bool is_available);
- string toString();
- friend ostream& operator<<(ostream& stream, const Book& other);
- };
- Book::Book(string author_name, string date, bool is_available) :
- author_name(author_name), date(date), is_available(is_available) {
- }
- Book::Book(const Book& other): author_name(other.author_name), date(other.date), is_available(other.is_available) {
- }
- Book::Book() : author_name(""), date(""), is_available(NULL) {
- }
- string Book::get_author_name() const {
- return this->author_name;
- }
- void Book::set_author_name(string author_name) {
- this->author_name = author_name;
- }
- string Book::get_date() const {
- return this->date;
- }
- void Book::set_date(string date) {
- this->date = date;
- }
- bool Book::get_is_available() const {
- return this->is_available;
- }
- void Book::set_is_available(bool is_available) {
- this->is_available = is_available;
- }
- void Book::set_book(string author_name, string date, bool is_available) {
- this->author_name = author_name;
- this->date = date;
- this->is_available = is_available;
- }
- class Library {
- protected:
- int count_books;
- Book books [];
- };
- int main()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement