-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrarySystem.h
More file actions
54 lines (50 loc) · 1.22 KB
/
LibrarySystem.h
File metadata and controls
54 lines (50 loc) · 1.22 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
#include<iostream>
using namespace std;
#include <string>
#include <cstddef>
#include "Student.h"
/*
Saitcan Baskol
21803589
SEC02
*/
class LibrarySystem
{
public:
LibrarySystem();
~LibrarySystem();
void addStudent(const int studentId, const string studentName);
void addBook(const int bookId, const string bookName, const int bookYear);
void checkoutBook(const int bookId, const int studentId);
void returnBook(const int bookId);
void showBook(const int bookId) const;
void showAllBooks() const;
void showStudent(const int studentId) const;
void deleteBook(const int bookId);
void deleteStudent(const int studentId);
bool isEmpty() const;
bool isBooksEmpty() const;
bool removeNode(int index);
bool removeBookNode(int index);
int findBookIndex(int bookId);
int findIndex(int studentId);
int getLengthBooks() const;
int getLength() const;
private:
struct Node
{
Student item;
Node* next;
};
Node* head;
int Size;
Node* findPointer(int index) const;
struct allBooksNode
{
Book item;
allBooksNode* next;
};
allBooksNode* bookHead;
int bookSize;
allBooksNode* findBookPointer(int index) const;
};