Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture Five The Project 1. Wen Yu BNUZ LIMS Description Design a simple Library Information Management System (LIMS) for an university The system includes.

Similar presentations


Presentation on theme: "Lecture Five The Project 1. Wen Yu BNUZ LIMS Description Design a simple Library Information Management System (LIMS) for an university The system includes."— Presentation transcript:

1 Lecture Five The Project 1

2 Wen Yu BNUZ LIMS Description Design a simple Library Information Management System (LIMS) for an university The system includes information of books and readers 2

3 Wen Yu BNUZ LIMS Description The fundamental functions for this system include adding, updating, deleting and querying a book, borrowing and returning a book for a user, querying a reader, and any other optional functions 3

4 Wen Yu BNUZ LIMS Description The information for a book includes isbn, which is unique for a book bName (book name) author price status 4

5 Wen Yu BNUZ LIMS Description Assume that all readers are students and their information includes sNumber (student number), which is unique for a reader sName (student name) borrowed (books borrowed) 5

6 Wen Yu BNUZ LIMS Description The details for each function are add : adding a book to the system update : updating a book info according to the isbn of the book delete : deleting a book from the system according to the isbn of the book queryBook : displaying the info of a book and the info of the reader who borrowed the book (if the book is borrowed by someone), according to the isbn of the book 6

7 Wen Yu BNUZ LIMS Description borrow : borrowing a book (isbn) for a reader (sNumber) return : returning a book (isbn) for a reader (sNumber) queryReader : display a reader’s info according to the sNumber, including the books borrowed 7

8 Wen Yu BNUZ LIMS Description When the system executes, a menu including main functions should be displayed, letting users to choose The menu should including the function that let users exit the system When a user selects a function to perform, the system should prompt the user enters necessary data to accomplish the task 8

9 Wen Yu BNUZ LIMS Description The system should display the operation the system is performing and let the user confirm the operation (such as deleting and updating) When an operation is finished, the result of the operation should displayed and the user should have options of continuing the current operation or returning back to the main menu 9

10 Wen Yu BNUZ Assumptions Assumptions can be made to reduce the complexity of the system The maximal number of books the system can have is 20 The maximal number of readers the system can have is 20 The maximal number of books a reader can borrow is 5 There is only one copy for each book in the system 10

11 Wen Yu BNUZ Implementation The system can have following data Five arrays to represent books A number indicating the current number of books the system contains Three arrays to represent readers A number indicating the current number of readers the system contains The maximal number of books, the maximal number of readers and the maximal number of books a reader can borrow can be global constants 11

12 Wen Yu BNUZ Implementation The detailed data structure for a book The isbn can be an int The book name and author can be strings The price can be a float or a double The status of a book refers to the info of the borrower, which can be set to be an integer value. If the book is borrowed by a reader, the student number can be assigned to the status; otherwise a special value (such as -1) is assigned 12

13 Wen Yu BNUZ Implementation The detailed data structure for a reader The student number can be an int or a long The reader’s name can be a string The books borrowed by the student can be an array of integers, representing the ISBNs of books borrowed A special value (such as -1) can be assigned to some elements of the array to indicate that the reader borrowed less than the maximal number of books he can borrowed 13

14 Wen Yu BNUZ Suggestions It is suggested that you develop the system incrementally Step 1 Write a control function (main function) To simplify the system, you can assign some initial values to the books and readers in the system in your control function Let the system contain book info Add an operation for book one by one Once you finish one function, test its correctness by invoking it in your main function 14

15 Wen Yu BNUZ Suggestions Step 3 Add user info to your system Add operations related to users incrementally Once you finish one function, test its correctness by invoking it in your main function Step 3 Use files to store book info and reader info instead of initializing them in the main function, so the change you made remains 15


Download ppt "Lecture Five The Project 1. Wen Yu BNUZ LIMS Description Design a simple Library Information Management System (LIMS) for an university The system includes."

Similar presentations


Ads by Google