-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBook.h
49 lines (41 loc) · 888 Bytes
/
Book.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <iostream>
#include <string>
using namespace std;
/**
* \class Book
* \ver 0.1
* \author Pavel Zhechko a.k.a sad_tigger
*/
class Book {
public:
friend class Cashier;
friend class Catalog;
//create 'empty' book
Book();
//create 'full' book
Book(string, string, int);
//destruct book
~Book();
string check_title() const {return title;}
/** test method for title
*/
void get_price() const { cout << "\"" << this->title << "\"" << " cost : " << this->price << " dollars." << endl;}
private:
string title; //< book title
string author; //< book author
int number_of_Pages;
//string isbn;
//string copyright;
int price;
int width;
};
Book::Book()
{
}
Book::Book(string _title,string _author, int _number_of_Pages)
: title(_title), author(_author), number_of_Pages(_number_of_Pages),price(0),width(0)
{
}
Book::~Book()
{
}