-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.cpp
81 lines (67 loc) · 1.21 KB
/
book.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include"book.h"
Book::Book(std::string title, std::string author, std::string ISBN, std::string press, std::string type)
{
m_title = title;
m_author = author;
m_ISBN = ISBN;
m_press = press;
m_type = type;
m_status = {"未借出", "NULL", "NULL"};
}
Book::Book(std::string title, std::string author, std::string ISBN, std::string press, std::string type, std::vector<std::string> status)
{
m_title = title;
m_author = author;
m_ISBN = ISBN;
m_press = press;
m_type = type;
m_status = status;
}
void Book::setTitle(std::string title)
{
m_title = title;
}
void Book::setAuthor(std::string author)
{
m_author = author;
}
void Book::setISBN(std::string ISBN)
{
m_ISBN = ISBN;
}
void Book::setPress(std::string press)
{
m_press = press;
}
void Book::setType(std::string type)
{
m_type = type;
}
void Book::setStatus(std::vector<std::string> status)
{
m_status = status;
}
std::string Book::getTitle()
{
return m_title;
}
std::string Book::getAuthor()
{
return m_author;
}
std::string Book::getISBN()
{
return m_ISBN;
}
std::string Book::getPress()
{
return m_press;
}
std::string Book::getType()
{
return m_type;
}
std::vector<std::string> Book::getStatus()
{
return m_status;
}