blob: c487e41eaf3c9fdd018afb4d4b397770e1b1ef1d (
plain) (
blame)
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
|
#include "Book.h"
#include <cstring>
Book::Book()
{}
Book::Book(const char* name, const char* author, unsigned count) {
this->set_name(name);
this->set_author(author);
this->set_count(count);
}
const char* Book::get_name() const {
return this->name;
}
void Book::set_name(const char* newName) {
strcpy(this->name, newName);
}
const char* Book::get_author() const {
return this->author;
}
void Book::set_author(const char* newAuthor) {
strcpy(this->author, newAuthor);
}
unsigned Book::get_count() const {
return this->count;
}
void Book::set_count(unsigned newCount) {
this->count = newCount;
}
|