-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransaction.cpp
More file actions
26 lines (20 loc) · 782 Bytes
/
Transaction.cpp
File metadata and controls
26 lines (20 loc) · 782 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
#include "Transaction.h"
#include <iostream>
Transaction::Transaction(const std::string& memberID, const std::string& bookISBN, const std::string& transactionType, const std::string& date)
: memberID(memberID), bookISBN(bookISBN), transactionType(transactionType), date(date) {}
std::string Transaction::getMemberID() const {
return memberID;
}
std::string Transaction::getBookISBN() const {
return bookISBN;
}
std::string Transaction::getTransactionType() const {
return transactionType;
}
std::string Transaction::getDate() const {
return date;
}
void Transaction::display() const {
std::cout << "Member ID: " << memberID << ", Book ISBN: " << bookISBN
<< ", Transaction Type: " << transactionType << ", Date: " << date << std::endl;
}