Your task is to write a simple library management system for a librarian. The librarian should...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Your task is to write a simple library management system for a librarian. The librarian should be able to check available books out and return any books they currently have. Details of all books in the library should be stored in a database (i.e., text files). 1.2 Book Info.txt For each book the following information should be stored: title, author, genre, purchase price, purchase date, a unique ID number which can be used to identify different copies of the same book. See example data below: ID Genre Title 1 2 3 *** ... n Sci-Fi Book_1 Fantasy Book_2 Sci-Fi Book_1 ... ... *** ... Author Author_1 Author 2 Author 1 ... ... Purchase Price JOD 10 20 10 Classics Book_n Author_n 40 Purchase Date 1/8/2010 1/8/2014 1/8/2010 .... ... 1/8/2014 Each line provides all the information for a particular book. Assume that the purchase price does not change over the years. Note that you are not allowed to add additional columns to the file. 1.3 Member Members should be identified using their unique ID-numbers. For simplicity it is suggested that you use 4-digit integers (e.g.: 1000-9999) for these IDs, and you may assume that all 4-digit numbers are valid members. (Note however that your program should be able to distinguish between valid and invalid IDs, so that e.g., hh9# would not be accepted. You do not store any further member information. 1.4 Searching for Books Your program should include functionality to search for a book based on its title. Given a search term (e.g.: "Treasure Island"), your program should return a complete list of books with all their associated information (e.g., title, author, genre and loan availability, etc.). 1.5 Checking Out Books In order to withdraw (or check-out) a book from the library, the librarian should provide a member-ID and the book's ID number (note it must be the ID, not the book title, since there could be more than one copy of the same book). Your program should then. 1. check that the input is valid (and return an error message if it is not), 2. return an appropriate message and a book reservation option if the book is not available due to being on loan, 3. if the book is available, allow the librarian to withdraw the book by updating the related records in the database accordingly. 1.6 Returning Books The librarian should be able to return books simply by providing the book's IDs. If the ID is invalid, or the book is already available, the program should return an error message. Otherwise, the database should be updated accordingly. Additionally, an appropriate message should be displayed if the book is reserved by a member. 1.7 Selecting Books Purchase Order The library has a budget to purchase books every year. Your program must have functionality to find out popular book titles to purchase more copies if it is necessary, and recommend genres to purchase new book titles. The librarian should provide the budget so that the system is able to generate the recommendation list. The program should suggest how many book copies the library would purchase for each genre in the list based on the given budget. The database should have a transaction log, which keeps the loan and reservation history of library books. Based on this log, the system can suggest the purchase list. 2 How to Structure Your Program The following structure is needed as a final submission for your project: Data Files: Stores all the required data. Book Info.txt Stores all the data (see previous section). You need to populate the file with the realistic data (minimum 20 records). logfile.txt Stores loan and reservation history of library books (i.e., Book_id, Member id, Checkout Date and Return Date and reservation information etc.). You need to populate the file with the realistic data (minimum 60 records). bookSearch.py: A Python module which contains functions used to allow librarian to input search terms as strings, and returns the output as described in the previous section. bookCheckout.py: A Python module which contains functions used to ask the librarian for borrower's member-ID and the ID of the book(s) to be checked out. Then, after performing the validity checks and functionality described in the previous section, the program should return a message letting the librarian know whether they have checked out the book(s) successfully. bookReturn.py: A Python module which contains functions used to ask the librarian for the ID of the book(s) they wish to return and provide either an appropriate error message, or a message letting them know they have returned the book(s) successfully. bookSelect.py: A Python module which contains functions used to list the recommended book genres for the librarian and appropriately visualise the list by using the Matplotlib module. You should come up with the details of the selection criteria. database.py: A Python module which contains common functions that the book search, checkout, return and select modules use to interact with the data files. menu.py: A python main program which provides the required menu options to the librarian for the program functionalities. The menu could be based on Python Graphical User Interface-GUI (namely the tkinter python module). In that case, the GUI must use only one window. Page 3 of 5 3 What to Submit In addition to the files mentioned in Section 2 you may want to write a short text file called README (max 500 words). This is to provide any special instructions or warnings to the user (or assessor!), or to draw attention to any aspects of the program that you are particularly proud of (please don't waste time by writing an excessive amount). All the files (including sample data files) should be compressed into a zip file and submitted electronically as directed. 4 Notes on Expectations: You will be marked according to your overall achievement, marked according to the Assessment Matrix that will be provided to you separately from this document. However below follows a qualitative description of some general expectation that may help you understand the general level of expectation associated with this piece of project. Technical mastery of Python Your programs should show mastery of what you have been taught. Design Your programs should be well structured for the task in hand so that it is as easy as possible for: • a user to use the program for any likely purpose, . a programmer to understand the code structure and be able to develop it further, a programmer to be able to re-use as much as possible of the code in a related application. Clarity and Self-Documentation Given the structure of your programs, they should be as easy to read and understand as possible. Lay your code out so that it can be listed sensibly on a variety of devices: avoid having any lines longer than 80 characters as these may wrap (to reduce the number of "problem lines" you should use 4 spaces for indentation rather than tabs). Sensible names should be chosen for all variables, methods etc. Documentation strings should be included for each: Program Fully explain what the program does and how it should be used. Also state who (ID only) wrote it and when. Function State what each function does and explain the roles of its parameters. جامعة البترا In addition, you should include occasional comments in your code; these may be (a) to introduce a new section in the code, or (b) to explain something that is not obvious. Bear in mind that pointless comments make your code harder to read, not easier. Restriction 1) Your code must NOT have any SQL statements. 2) Your code must NOT have any nested function declaration. 3) You must use Python v3.8 or above. 4) Your code must use ONLY standard python libraries. Page 5 of 5 Your task is to write a simple library management system for a librarian. The librarian should be able to check available books out and return any books they currently have. Details of all books in the library should be stored in a database (i.e., text files). 1.2 Book Info.txt For each book the following information should be stored: title, author, genre, purchase price, purchase date, a unique ID number which can be used to identify different copies of the same book. See example data below: ID Genre Title 1 2 3 *** ... n Sci-Fi Book_1 Fantasy Book_2 Sci-Fi Book_1 ... ... *** ... Author Author_1 Author 2 Author 1 ... ... Purchase Price JOD 10 20 10 Classics Book_n Author_n 40 Purchase Date 1/8/2010 1/8/2014 1/8/2010 .... ... 1/8/2014 Each line provides all the information for a particular book. Assume that the purchase price does not change over the years. Note that you are not allowed to add additional columns to the file. 1.3 Member Members should be identified using their unique ID-numbers. For simplicity it is suggested that you use 4-digit integers (e.g.: 1000-9999) for these IDs, and you may assume that all 4-digit numbers are valid members. (Note however that your program should be able to distinguish between valid and invalid IDs, so that e.g., hh9# would not be accepted. You do not store any further member information. 1.4 Searching for Books Your program should include functionality to search for a book based on its title. Given a search term (e.g.: "Treasure Island"), your program should return a complete list of books with all their associated information (e.g., title, author, genre and loan availability, etc.). 1.5 Checking Out Books In order to withdraw (or check-out) a book from the library, the librarian should provide a member-ID and the book's ID number (note it must be the ID, not the book title, since there could be more than one copy of the same book). Your program should then. 1. check that the input is valid (and return an error message if it is not), 2. return an appropriate message and a book reservation option if the book is not available due to being on loan, 3. if the book is available, allow the librarian to withdraw the book by updating the related records in the database accordingly. 1.6 Returning Books The librarian should be able to return books simply by providing the book's IDs. If the ID is invalid, or the book is already available, the program should return an error message. Otherwise, the database should be updated accordingly. Additionally, an appropriate message should be displayed if the book is reserved by a member. 1.7 Selecting Books Purchase Order The library has a budget to purchase books every year. Your program must have functionality to find out popular book titles to purchase more copies if it is necessary, and recommend genres to purchase new book titles. The librarian should provide the budget so that the system is able to generate the recommendation list. The program should suggest how many book copies the library would purchase for each genre in the list based on the given budget. The database should have a transaction log, which keeps the loan and reservation history of library books. Based on this log, the system can suggest the purchase list. 2 How to Structure Your Program The following structure is needed as a final submission for your project: Data Files: Stores all the required data. Book Info.txt Stores all the data (see previous section). You need to populate the file with the realistic data (minimum 20 records). logfile.txt Stores loan and reservation history of library books (i.e., Book_id, Member id, Checkout Date and Return Date and reservation information etc.). You need to populate the file with the realistic data (minimum 60 records). bookSearch.py: A Python module which contains functions used to allow librarian to input search terms as strings, and returns the output as described in the previous section. bookCheckout.py: A Python module which contains functions used to ask the librarian for borrower's member-ID and the ID of the book(s) to be checked out. Then, after performing the validity checks and functionality described in the previous section, the program should return a message letting the librarian know whether they have checked out the book(s) successfully. bookReturn.py: A Python module which contains functions used to ask the librarian for the ID of the book(s) they wish to return and provide either an appropriate error message, or a message letting them know they have returned the book(s) successfully. bookSelect.py: A Python module which contains functions used to list the recommended book genres for the librarian and appropriately visualise the list by using the Matplotlib module. You should come up with the details of the selection criteria. database.py: A Python module which contains common functions that the book search, checkout, return and select modules use to interact with the data files. menu.py: A python main program which provides the required menu options to the librarian for the program functionalities. The menu could be based on Python Graphical User Interface-GUI (namely the tkinter python module). In that case, the GUI must use only one window. Page 3 of 5 3 What to Submit In addition to the files mentioned in Section 2 you may want to write a short text file called README (max 500 words). This is to provide any special instructions or warnings to the user (or assessor!), or to draw attention to any aspects of the program that you are particularly proud of (please don't waste time by writing an excessive amount). All the files (including sample data files) should be compressed into a zip file and submitted electronically as directed. 4 Notes on Expectations: You will be marked according to your overall achievement, marked according to the Assessment Matrix that will be provided to you separately from this document. However below follows a qualitative description of some general expectation that may help you understand the general level of expectation associated with this piece of project. Technical mastery of Python Your programs should show mastery of what you have been taught. Design Your programs should be well structured for the task in hand so that it is as easy as possible for: • a user to use the program for any likely purpose, . a programmer to understand the code structure and be able to develop it further, a programmer to be able to re-use as much as possible of the code in a related application. Clarity and Self-Documentation Given the structure of your programs, they should be as easy to read and understand as possible. Lay your code out so that it can be listed sensibly on a variety of devices: avoid having any lines longer than 80 characters as these may wrap (to reduce the number of "problem lines" you should use 4 spaces for indentation rather than tabs). Sensible names should be chosen for all variables, methods etc. Documentation strings should be included for each: Program Fully explain what the program does and how it should be used. Also state who (ID only) wrote it and when. Function State what each function does and explain the roles of its parameters. جامعة البترا In addition, you should include occasional comments in your code; these may be (a) to introduce a new section in the code, or (b) to explain something that is not obvious. Bear in mind that pointless comments make your code harder to read, not easier. Restriction 1) Your code must NOT have any SQL statements. 2) Your code must NOT have any nested function declaration. 3) You must use Python v3.8 or above. 4) Your code must use ONLY standard python libraries. Page 5 of 5
Expert Answer:
Answer rating: 100% (QA)
The images youve provided outline a project assignment where you are required to create a simple library management system in Python for a librarian The system must handle various tasks such as checki... View the full answer
Related Book For
Accounting Information Systems
ISBN: 978-0133428537
13th edition
Authors: Marshall B. Romney, Paul J. Steinbart
Posted Date:
Students also viewed these accounting questions
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Write a project management plan. we have a template and project description. we need to edit the template(table of contents) with our own ideas. CPSC 8820-01 Project Management Plan Your Unique...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The use of prenumbered checks in disbursing cash is an application of the principle of: (a) establishment of responsibility. (b) segregation of duties. (c) physical controls. (d) documentation...
-
If an objects average velocity is zero over some time interval, show that its instantaneous velocity must be zero at some time during the interval. It may be useful in your proof to sketch a graph of...
-
A drug for the relief of asthma can be purchased from 5 different, manufacturers in liquid, tablet, or capsule form, all of which come in regular and extra strength. How many different ways can a...
-
Describe the environmental impact-added life-cycle chain. Select one particular industry and list the environmental interventions for each function in the chain. Rank the functions in terms of their...
-
You have been assigned to collect thermodynamic data for a new liquid product your company is about to begin manufacturing and you decide to use a continuous-flow technique to generate a correlation...
-
A manager of a semiconductor manufacturing firm, who can choose from many different production technologies, must determine whether to use the same technology in its foreign plant that it uses in its...
-
Non-controlling interests of profitable subsidiaries result in a credit item in the income statement and a debit balance in the statement of financial position. True/False
-
Economics Page 2 of 2Max 10X1 + 5X2S.T.Constraint 112X1 + 15X2 180Constraint 215X1 + 10X2 150Constraint 3X1 2 Constraint 4X2 1 Constraint 5-5X1 + 7X2 0X1, X2 0Questions: a.Plot all constraint (20...
-
Jim is the managing director of a company and earns a basic salary in 2017 -18 of 225,000. He receives benefits from the company during the year as follows: (a) He is provided with the use of a...
-
Kim lives in a house provided by her employer. The house cost her employer 2 42,500 in 2015 and a further 27,500 w as spent on improvements in 2016.The house has a gross rateable value of 3,700 and...
-
Georgina owns three holiday flats, all of which s he lets furnished with a view to profit. None of the flats is ever let to the same tenant for more t han 31 consecutive days. In 2017-18 the number...
-
Hitesh has been trading for many years, preparing accounts to 31 January each year. His last full year of tradin g is the year to 31 January 2017. Identify the basis periods for the last three tax...
-
Calculate the income tax liability for 2017-18 of a non -Scottish taxpayer with a taxable income (after deducting any available personal allowance) of: (a) 1,830 (b) 32,300 (c) 67,833 (d) 320,000....
-
Paralegals may not engage in the unauthorized practice of law. Discuss what constitutes the unauthorized practice of law. How many different points of view are represented by the definition of...
-
What does non-recourse financing mean?
-
Download the spreadsheet for problem 14.9 from the website for this textbook. Write formulas to calculate the total depreciation expense and to display the correct values in the following three...
-
What is the difference between an Entity-Relationship (E-R) diagram and an REA diagram?
-
Identify the DFD elements in the following narrative: A customer purchases a few items from a local grocery store. Jill, a salesclerk, enters the transaction in the cash register and takes the...
-
What is the effect of pressure on equilibrium conversion of a gas-phase chemical reaction?
-
The diathermal wall (a) Is incapable of exchanging heat with the surroundings (b) Permits the full flow of heat from the system to the surroundings and vice versa (c) Both (a) and (b) (d) None of...
-
The total energy of a system comprises (a) Kinetic energy, potential energy and vibrational energy (b) Kinetic energy, potential energy and rotational energy (c) Kinetic energy, potential energy and...
Study smarter with the SolutionInn App