-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBook.h
More file actions
176 lines (145 loc) · 2.42 KB
/
Copy pathBook.h
File metadata and controls
176 lines (145 loc) · 2.42 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/**
* @file Book.h
* @author Sam Emison + Cole Belew
* @date 2024-11-07
* @brief Class for Book
* .
* Stated in class definition
*/
#ifndef BOOK_H
#define BOOK_H
#include <string>
/**
* Class for getting the information on the books
*
* @class BOOK Book.h "Library/Book.h"
* @brief
*
*/
class BOOK {
private:
std::string title;
std::string author;
int pages;
std::string isbn;
float coverPrice;
int year;
public:
//Constructor
Book(const std::string& title, const std::string& author, std::string& pages, const std::string isbn, float coverPrice, int year);
/**
* Gets the title of the book
*
* @pre
* @return std::string
* @post Returns the title
*
*/
std::string getTitle() const;
/**
* Gets the author's name
*
* @pre
* @return std::string
* @post Returns the authors name
*
*/
std::string getAuthor() const;
/**
* Gets the pages
*
* @pre
* @return int
* @post Returns pages
*
*/
int getPages() const;
/**
* Gets the isbn number
*
* @pre
* @return std::string
* @post Returns the isbn
*
*/
std::string getISBN() const;
/**
* Gets the price of the book
*
* @pre
* @return float
* @post Returns the price
*
*/
float getCoverPrice() const;
/**
* Gets the year the book was published
*
* @pre
* @return int
* @post Returns the year
*
*/
int getYear() const;
/**
* Sets the title of the book
*
* @param const std::string& title
* @pre
* @return void
* @post Ensures it doesnt change
*
*/
void setTitle(const std::string& title);
/**
* Sets the author of the book
*
* @param const std::string& author
* @pre
* @return void
* @post Ensures it doesnt change
*
*/
void setAuthor(const std::string& author);
/**
* Sets the page numbers of the book
*
* @param int pages
* @pre
* @return void
* @post Ensures it doesnt change
*
*/
void setPages(int pages);
/**
* Sets the isbn number of the book
*
* @param const std::string& isbn
* @pre
* @return void
* @post Ensures it doesnt change
*
*/
void setISBN(const std::string& isbn);
/**
* Sets the price of the book
*
* @param float coverPrice
* @pre
* @return void
* @post Ensures it doesnt change
*
*/
void setCoverPrice(float coverPrice);
/**
* Sets the year the book was published
*
* @param int year
* @pre
* @return void
* @post Ensures it doesnt change
*
*/
void setYear(int year);
};
#endif // BOOK_H