-
Notifications
You must be signed in to change notification settings - Fork 1
/
class.h
87 lines (72 loc) · 1.35 KB
/
class.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
class LIB
{
string lib_name;
string librarian_name;
string username;
string password;
int book_count,stud_count;
struct borrowed
{
int id;
borrowed * next;
};
struct booknode
{
string name;
string author;
float price;
int quantity;
int remaining;
int id;
booknode * next;
borrowed * borrowers;
}*book_start;
struct studentnode
{
int id;
string name;
string address;
string clas;
string div;
long long int contact;
borrowed * borrowedbooks;
studentnode * next;
}*stud_start;
public:
LIB()
{
book_count = 0;
stud_count = 0;
book_start = NULL;
stud_start = NULL;
lib_name = "LIBRARY NAME";
librarian_name = "LIBRARIAN NAME";
username = "username";
password = "password";
}
//students section
void add_student(); //done
void remove_student(); //done
void edit_student(); //done
void stud_details(); //done
void show_all_stud(); //done
//books section
void add_book(); //done
void remove_book(); //done
void edit_book(); //done
void lend_book(); //done
void return_book(); //done
void show_all_books(); //done
void book_details(); //done
//encryption
string encrypt(string,string);
string decrypt(string,string);
//file handling
void save();
void load();
//menu section
void menu();
void book_menu();
void stud_menu();
//void book_menu();
};