From 3c09a3ee39a463274e2f7109266616a1a9727b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E4=BD=B3=E6=85=A7?= <1608111480@qq.com> Date: Wed, 26 Apr 2023 19:38:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=9B=BEC7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- ReaderInfo.svg | 166 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 ReaderInfo.svg diff --git a/README.md b/README.md index b18c7e8..e24d3ba 100644 --- a/README.md +++ b/README.md @@ -692,11 +692,11 @@ 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);\\读者借书 C9:void returnBook(Reader* reader, 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 + + + + + From 27a3665925db66648649e57440812d3d737a6d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E4=BD=B3=E6=85=A7?= <1608111480@qq.com> Date: Wed, 26 Apr 2023 19:40:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=9B=BEC8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LendBook.svg | 671 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 672 insertions(+), 1 deletion(-) create mode 100644 LendBook.svg 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 e24d3ba..0d8bf6e 100644 --- a/README.md +++ b/README.md @@ -698,7 +698,7 @@ C6:void foundReader_Info(Reader* reader);\\查询读者的借阅信息 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);\\文件保存