-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoan.h
More file actions
62 lines (49 loc) · 1.37 KB
/
Loan.h
File metadata and controls
62 lines (49 loc) · 1.37 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
/*
File:
Loan.h
*/
#ifndef LOAN_H
#define LOAN_H
#include <string>
#include <ctime>
using namespace std;
class Loan
{
private:
int loanID;
int itemID;
int patronID;
string itemCategory; //Category of the LibraryItem (Book, AudioCD, DVD)
string dueDate; //Time utilization using "YYYY-MM-DD"
string loanDate; // New attribute to store the loan start date
string status; //Status such as: (Overdue, Normal, Lost, Returned)
public:
Loan(); //Default Constructor
Loan(int loanID, int itemID, int patronID, string itemCategory, string dueDate, string status, string loanDate); //Parameterized constructor
//Loan Methods
void borrowItem();
void returnItem();
void listOverdue() const;
void updateLoanStatus();
void recheckItem();
void editLoan();
void reportLost();
//Getter for isOverdue function
bool isOverdue() const;
//Getters and Setters
int getLoanID() const;
int getItemID() const;
int getPatronID() const;
string getItemCategory() const;
string getDueDate() const;
string getLoanDate() const;
string getStatus() const;
void setLoanID(int loanID);
void setItemID(int itemID);
void setPatronID(int patronID);
void setItemCategory(string itemCategory);
void setDueDate(string dueDate);
void setLoanDate(string loanDate);
void setStatus(string status);
};
#endif