-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrary.cpp
More file actions
35 lines (29 loc) · 782 Bytes
/
Library.cpp
File metadata and controls
35 lines (29 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
27
28
29
30
31
32
33
34
35
#include "Library.h"
#include <iostream>
void Library::addBook(const Book& book) {
books.push_back(book);
}
void Library::addMember(const Member& member) {
members.push_back(member);
}
void Library::addTransaction(const Transaction& transaction) {
transactions.push_back(transaction);
}
void Library::displayBooks() const {
std::cout << "Books in Library:\n";
for (const auto& book : books) {
book.display();
}
}
void Library::displayMembers() const {
std::cout << "Library Members:\n";
for (const auto& member : members) {
member.display();
}
}
void Library::displayTransactions() const {
std::cout << "Library Transactions:\n";
for (const auto& transaction : transactions) {
transaction.display();
}
}