-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintedBook.cpp
More file actions
26 lines (21 loc) · 1.04 KB
/
Copy pathPrintedBook.cpp
File metadata and controls
26 lines (21 loc) · 1.04 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
#include "../include/PrintedBook.h"
#include <iostream>
PrintedBook::PrintedBook(std::string isbn, std::string title, std::string author,
std::string category, int year, int copies,
std::string shelf, int pages, std::string cond)
: Book(isbn, title, author, category, year, copies),
shelfLocation(shelf), pageCount(pages), condition(cond) {}
std::string PrintedBook::getShelfLocation() const { return shelfLocation; }
int PrintedBook::getPageCount() const { return pageCount; }
std::string PrintedBook::getCondition() const { return condition; }
void PrintedBook::setShelfLocation(const std::string& shelf) { shelfLocation = shelf; }
void PrintedBook::setCondition(const std::string& cond) { condition = cond; }
void PrintedBook::displayBookInfo() const {
std::cout << *this
<< " | Shelf: " << shelfLocation
<< " | Pages: " << pageCount
<< " | Condition: " << condition << "\n";
}
std::string PrintedBook::getBookType() const {
return "Printed";
}