-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoans.h
More file actions
55 lines (46 loc) · 1.11 KB
/
Loans.h
File metadata and controls
55 lines (46 loc) · 1.11 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
/*
Lisa Lin (lisalin@my.unt.edu)
Homework 3 Assignment - Library Management System
Started: 3/12/2021
Loans storage header file
*/
#ifndef LL0484HW3_LOANS_H
#define LL0484HW3_LOANS_H
#include "Loan.h"
#include "Patrons.h"
#include "Patron.h"
#include "Books.h"
#include "Book.h"
#include <string>
#include <map>
#include <iostream>
#include <time.h>
using namespace std;
class Loans {
public:
Loan* findLoan(int loanID);
void searchLoan();
/*
* menu functions
*/
void checkOutBook(Books* books, Patrons* patrons);
void checkInBook(Books* books, Patrons* patrons);
void recheckBook();
void reportLost(Books* books, Patrons* patrons);
void editLoan(Books* books, Patrons* patrons);
void updateLoan(Books* books, Patrons* patrons);
void listAllOverdue();
void listSpecificOverdue();
void printAllLoans();
/*
store and load
*/
int numOfLoans(); //for use in storing
void store();
void load();
private:
map<int, Loan*> loans; //loan id (int) to store loans
map<int, vector<Loan*>*> bookIDtoLoan; // book id to loan
map<int, vector<Loan*>*> patronIDtoLoan;
};
#endif //LL0484HW3_LOANS_H