-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlistManagement.h
More file actions
60 lines (44 loc) · 2.36 KB
/
listManagement.h
File metadata and controls
60 lines (44 loc) · 2.36 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
56
57
58
59
60
#ifndef LISTMANAGEMENT_GUARD__H
#define LISTMANAGEMENT_GUARD__H
#include "book_management.h"
// insert a new node to the book list at the tail
// books is the pointer pointing to the head node of the book list
void tailInsertBooks(Book* books);
// insert a new node to the student list at the tail
// students is the pointer pointing to the head node of the student list
void tailInsertStudents(Student* students);
// insert a new node to the borrowing informaion list at the tail
// borrows is the pointer pointing to the head node of the borrowing information list
void tailInsertBorrowInformation(BorrowInformation* borrows);
// display the book list
void showListBooks(Book* books, unsigned int length);
//display the student list
void showListStudents(Student* Student, unsigned int length);
// delete a node from the tail of the list
// books is the pointer pointing to the head node of the book list
// length is the number of nodes before deleting except the head node
void tailDeleteBooks(Book* books, unsigned int length);
// delete a node from the tail of the list
// students is the pointer pointing to the head node of the student list
// length is the number of nodes before deleting except the head node
void tailDeleteStudents(Student* students, unsigned int length);
// delete a node from the tail of the list
// borrows is the pointer pointing to the head node of the borrowing information list
// length is the number of nodes before deleting except the head node
void tailDeleteBorrowInformation(BorrowInformation* borrows);
// delete a node in the middle of the book list
// index is the position of node you want to delete
void middleDeleteBooks(Book* books, BookList* theBook, int index);
//delete a node in the middle of the student list
// index is the position of node you want to delete
void middleDeleteStudents(Student* students, StudentList* theStudent, int index);
//delete a node in the middle of the borrow information list
// index is the position of node you want to delete
void middleDeleteBorrows(BorrowInformation* borrows, int index);
// free the space of book list in the heap
void destroyBook(Book* books, unsigned int length);
// free the space of student list in the heap
void destroyStudent(Student* students, unsigned int length);
// free the space of borrowing information list in the heap
void destroyBorrowInformation(BorrowInformation* borrows);
#endif