-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibraryItem.cpp
More file actions
58 lines (45 loc) · 957 Bytes
/
LibraryItem.cpp
File metadata and controls
58 lines (45 loc) · 957 Bytes
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
/*
File:
LibraryItem.cpp
*/
#include "LibraryItem.h"
using namespace std;
//Default Constructor
LibraryItem::LibraryItem() : libraryID(0), cost(0.0), status("In"), loanPeriod(0) {}
//Parametrized Constructor
LibraryItem::LibraryItem(int libraryID, double cost, string status, int loanPeriod)
: libraryID(libraryID), cost(cost), status(status), loanPeriod(loanPeriod) {}
//Getter Methods
int LibraryItem::getLibraryID() const
{
return libraryID;
}
double LibraryItem::getCost() const
{
return cost;
}
string LibraryItem::getStatus() const
{
return status;
}
int LibraryItem::getLoanPeriod() const
{
return loanPeriod;
}
//Setter Methods
void LibraryItem::setLibraryID(int libraryID)
{
this->libraryID = libraryID;
}
void LibraryItem::setCost(double cost)
{
this->cost = cost;
}
void LibraryItem::setStatus(string status)
{
this->status = status;
}
void LibraryItem::setLoanPeriod(int loanPeriod)
{
this->loanPeriod = loanPeriod;
}