diff --git a/LendBook.svg b/LendBook.svg new file mode 100644 index 0000000..3c832b7 --- /dev/null +++ b/LendBook.svg @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + LendBook + + + + + + End + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + String reader1 + + + + + + + + String book1 + + + + + + + + Integer id + + + + + + Input id + + + + + + Input reader + + + + + + + + + + + + + reader == NULL + + + + + + + + + + + + + Output Reader* tmp = + (Reader*)malloc(sizeof + (Reader)); + + + tmp->next = NULL + ; + + + tmp->iAmount = + 0; + + + tmp->iNum = id; + + + + + + Input 读者名字 + + + + + + Input 读者性别 + + + + + + Input 读者职位 + + + + + + + + True + + + False + + + + + + + + + + + + + + + strcmp(tmp->position, + "student"==0 + + + + + + Output iMax = + 20; + day = 30; + + + + + + Output tmp->iMax = + 40; + tmp->day = 60; + + + + + True + + + False + + + + + + + + + + + Output tmp->aiBookId[i] = 0 + + + + + + i = 0 to iMax + + + + Next + + + Done + + + + + + + + Integer idbook + + + + + + Input idbook + + + + + + Input book + + + + + + + + + + + + + + + + + + + + id_book == book->iNum + + + + + + + + + + + + + + + + book->iAmount <= 1 + + + + + + + + + Output + 借阅失败该图书库存不足 + + + + + + Output 返回NULL + + + + + + + + True + + + False + + + + + + + + + + + + + (tmp->iAmount) + 1 > tmp-> + iMax + + + + + + + + + Output + 借阅失败该读者借阅图书数量已达上线 + + + + + + Output 返回NULL + + + + + + + + True + + + False + + + + + + + + + + Output 借阅成功 + + + + + + Output 返回reader + + + + + + True + + + False + + + + + + book!=NULL + + + + True + + + False + + + + + + Output book = book->next + + + + + + Output 没有找到该书 + + + + + + Output 返回reader1 + + + + + + + + + + + + + + + reader!=NULL + + + + + + + + + + + + + + + + + + + + + + + + + + + + id == reader->iNum + + + + + + + + + + + Output 图使馆当前的书册籍 + + + + + + Input 要借的书的编号 + + + + + + + + + + + + + + + + + + id_book == book->iNum + + + + + + + + + + + + + + + + book->iAmount <= 1 + + + + + + + + + Output 借阅失败 + + + + + + Output returnreader1 + + + + + + + + True + + + False + + + + + + + + + + + + + (tmpp->iAmount + 1 > tmpp + ->iMax + + + + + + + + + Output 借阅失败, + 该读者借阅图书数量已达上线 + + + + + + Output 返回reader1 + + + + + + + + True + + + False + + + + + + + + True + + + False + + + + + + book!=NULL + + + + True + + + False + + + + + + + + + + + + Output reader->iAmount++ + + + + + + Output reader->aiBookId + [tmpp->iAmount] = id_book + + + + + + Output 返回reader1 + + + + + + True + + + False + + + + + + Output book = book->next + + + + + + + reader != NULL + + + + True + + + False + + + + + + Output 没有找到该书 + + + + + + Output 按任意键返回 + + + + + + + Output reader = reader-> + next + + + + + True + + + False + + + + + diff --git a/README.md b/README.md index b18c7e8..0d8bf6e 100644 --- a/README.md +++ b/README.md @@ -692,13 +692,13 @@ C3:Book* AddBook(Book* book);\\存入新书 C4:Book* DealoldBook(Book* book);\\旧书处理 C5:void foundBook(Book* book);\\根据书名检索书刊信息 - +![555](foundbook.svg) C6:void foundReader_Info(Reader* reader);\\查询读者的借阅信息 - +![666](foundreaderinfo.svg) C7:void foundReaderInfo(Reader* reader);\\查询读者信息 - +![777](ReaderInfo.svg) C8:Reader* LendBook(Reader* reader, Book* book);\\读者借书 - +![888](LendBook.svg) C9:void returnBook(Reader* reader, Book* book);\\读者还书 C10:void save(Book* book);\\文件保存 diff --git a/ReaderInfo.svg b/ReaderInfo.svg new file mode 100644 index 0000000..12e8d23 --- /dev/null +++ b/ReaderInfo.svg @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + ReaderInfo + + + + + + End + + + + + + + + + + + + + + + + + + + + + String reader1 + + + + + + + + Integer id + + + + + + Input id + + + + + + Input reader1 + + + + + + + + + + + + + + + + + + + + id == reader->iNum + + + + + + + + + + + + + + + Output 读者id + + + + + + Output 读者姓名 + + + + + + Output 读者性别 + + + + + + Output 读者已借阅书的数量 + + + + + + Input reader + + + + + + + Output reader = reader-> + next + + + + + True + + + False + + + + + + reader + + + + True + + + False + + + + + + Output 没有找到该读者 + + + + + + Input reader + + + + +