-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransaction.cpp
More file actions
executable file
·42 lines (33 loc) · 829 Bytes
/
Transaction.cpp
File metadata and controls
executable file
·42 lines (33 loc) · 829 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
//
// Created by nikang on 12/22/16.
//
#include "Transaction.h"
#include "Library.h"
Transaction::Transaction(Book *book, Member *member, Date *issue_date) : book(book), member(member) {
this->trans_id = Library::Id_generator();
this->issue_date = new Date();
this->due_date = new Date();
this->issue_date = issue_date;
}
long Transaction::getTrans_id() const {
return trans_id;
}
Book *Transaction::getBook() const {
return book;
}
Member *Transaction::getMember() const {
return member;
}
Date *Transaction::getIssue_date() const {
return issue_date;
}
Date *Transaction::getDue_date() const {
return due_date;
}
bool Transaction::isIs_finished() const {
return is_finished;
}
void Transaction::finished(Date *date) {
this->due_date = date;
this->is_finished = true;
}