Design a Library Management system, Assignments of Introduction to Computing

Facilitate to maintaining the database for entering new books and recording books that have been borrowed with their respective due dates &so on.

Typology: Assignments

2021/2022

Uploaded on 06/04/2022

hirusha-malith
hirusha-malith 🇱🇰

2

(2)

9 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Design a Library
Management System
We'll cover the following
oSystem Requirements
oUse case diagram
oClass diagram
oActivity diagrams
oCode
A Library Management System is a software built to handle the
primary housekeeping functions of a library. Libraries rely on
library management systems to manage asset collections as well as
relationships with their members. Library management systems
help libraries keep track of the books and their checkouts, as well
as members’ subscriptions and profiles.
Library management systems also involve maintaining the database
for entering new books and recording books that have been
borrowed with their respective due dates.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Design a Library Management system and more Assignments Introduction to Computing in PDF only on Docsity!

Design a Library

Management System

We'll cover the following

o System Requirements o Use case diagram o Class diagram o Activity diagrams o Code A Library Management System is a software built to handle the primary housekeeping functions of a library. Libraries rely on library management systems to manage asset collections as well as relationships with their members. Library management systems help libraries keep track of the books and their checkouts, as well as members’ subscriptions and profiles. Library management systems also involve maintaining the database for entering new books and recording books that have been borrowed with their respective due dates.

System Requirements # Always clarify requirements at the beginning of the interview. Be sure to ask questions to find the exact scope of the system that the interviewer has in mind. We will focus on the following set of requirements while designing the Library Management System:

  1. Any library member should be able to search books by their title, author, subject category as well by the publication date.
  2. Each book will have a unique identification number and other details including a rack number which will help to physically locate the book.
  3. There could be more than one copy of a book, and library members should be able to check-out and reserve any copy. We will call each copy of a book, a book item.
  4. The system should be able to retrieve information like who took a particular book or what are the books checked-out by a specific library member.

Reserve book: To reserve a book which is not currently available.  Renew a book: To reborrow an already checked-out book.  Return a book: To return a book to the library which was issued to a member.

Use case diagram

Class diagram #

Class diagram for Library Management System

Activity diagrams # Check-out a book: Any library member or librarian can perform this activity. Here are the set of steps to check-out a book: Return a book: Any library member or librarian can perform this activity. The system will collect fines from members if they return books after the due date. Here are the steps for returning a book:

Renew a book: While renewing (re-issuing) a book, the system will check for fines and see if any other member has not reserved the same book, in that case the book item cannot be renewed. Here are the different steps for renewing a book: Code # Here is the code for the use cases mentioned above:

  1. Check-out a book,
  2. Return a book, and
  3. Renew a book. Note: This code only focuses on the design part of the use cases. Since you are not required to write a fully executable code in an interview, you can assume parts of the code to interact with the database, payment system, etc. Enums and Constants: Here are the required enums, data types, and constants:

 Java

 Python

NONE

public enum AccountStatus{ ACTIVE, CLOSED, CANCELED, BLACKLISTED, NONE } public class Address { private String streetAddress; private String city; private String state; private String zipCode; private String country; } public class Person { private String name;

private AccountStatus status; private Person person; public boolean resetPassword(); } public class Librarian extends Account { public boolean addBookItem(BookItem bookItem); public boolean blockMember(Member member); public boolean unBlockMember(Member member); } public class Member extends Account { private Date dateOfMembership; private int totalBooksCheckedout; public int getTotalBooksCheckedout(); public boolean reserveBookItem(BookItem bookItem); private void incrementTotalBooksCheckedout(); public boolean checkoutBookItem(BookItem bookItem) { if (this.getTotalBooksCheckedOut() >= Constants.MAX_BOOKS_ISSUED_TO_A _USER) { ShowError("The user has already checked-out maximum number of books "); return false; } BookReservation bookReservation = BookReservation.fetchReservationDet ails(bookItem.getBarcode()); if (bookReservation != null && bookReservation.getMemberId() != thi s.getId()) { // book item has a pending reservation from another user BookReservation, BookLending, and Fine: These classes represent a book reservation, lending, and fine collection, respectively.

 Java

 Python

public class BookReservation { private Date creationDate; private ReservationStatus status; private String bookItemBarcode; private String memberId; public static BookReservation fetchReservationDetails(String barcode); } public class BookLending { private Date creationDate; private Date dueDate; private Date returnDate; private String bookItemBarcode; private String memberId; public static boolean lendBook(String barcode, String memberId); public static BookLending fetchLendingDetails(String barcode);

public abstract class Book { private String ISBN; private String title; private String subject; private String publisher; private String language; private int numberOfPages; private List authors; } public class BookItem extends Book { private String barcode; private boolean isReferenceOnly; private Date borrowed; private Date dueDate; private double price; private BookFormat format; private BookStatus status; private Date dateOfPurchase; private Date publicationDate; private Rack placedAt; public boolean checkout(String memberId) { if(bookItem.getIsReferenceOnly()) { ShowError("This book is Reference only and can't be issued"); return false; } if(!BookLending.lendBook(this.getBarCode(), memberId)){ return false; } this.updateBookItemStatus(BookStatus.LOANED); Search interface and Catalog: The Catalog class will implement the Search interface to facilitate searching of books.

 Java

 Python

public interface Search { public List searchByTitle(String title); public List searchByAuthor(String author); public List searchBySubject(String subject); public List searchByPubDate(Date publishDate); } public class Catalog implements Search { private HashMap<String, List> bookTitles; private HashMap<String, List> bookAuthors; private HashMap<String, List> bookSubjects; private HashMap<String, List> bookPublicationDates; public List searchByTitle(String query) { // return all books containing the string query in their title. return bookTitles.get(query); } public List searchByAuthor(String query) { // return all books containing the string query in their author's nam e. return bookAuthors.get(query); }

Unit 10: Website Design & Development Pearson BTEC Level 4 Higher National Certificate in Computing

Explain server technologies and management services associated with hosting and managing websites. Categorise website technologies, tools and software used to develop websites. Utilise website technologies, tools and techniques with good design principles to create a multipage website. Create and use a Test Plan to review the performance and design of a multipage website. LO 1 Explain server technologies and management services associated with hosting and managing websites. Different Server Technologies × Differences between web server hardware, software and host operating systems. × Advantages of an integrated database system with regards to expanding website capability. × Common web development technologies and frameworks. × There are different types of technologies available such as: × Web Server hardware × Web Server software × Host operating systems server × Server × refers to a computer or device on a network that manages network resources. × Can you name other types of server? × can refer to either the hardware (the computer) × or the software (the computer application) × that helps to deliver web content that can be accessed through the Internet. × are computers that deliver Web pages. × Every Web server has an IP address and possibly a domain name. × Give the differences between following: × web server hardware, × web server software, and × host operating systems the × The three main elements of a web server: × web server hardware, × web server software, and × host operating systems

× Development sites Used to evaluate different Web designs × Intranets Corporate networks that house internal memos, corporate policy handbooks, and a variety of other corporate documents × Extranets Intranets that allow authorized parties outside the company to access information stored in the system × Transaction-processing sites Commerce sites that must be available 24 hours a day, seven days a week × Content-delivery sites Deliver content such as news, histories, summaries, and other digital information × Client/server architectures Client computers typically request services A server processes the clients’ requests × Web software Lets different types of computers running different operating systems communicate

  • Dynamic content is nonstatic information constructed in response to a Web client’s request • Dynamic page Web page whose content is shaped by a program in response to user requests • Static page An unchanging page retrieved from disk
  • Server-side scripting Programs running on a Web server create Web pages before sending them back to the requesting Web clients • Dynamic page-generation technologies include: Active Server Pages (ASP) JavaServer Pages (JSP) PHP: Hypertext Preprocessor (PHP) web server hardware × are computers that deliver Web pages. × Why does web server hardware matters?? × Web Traffic It is need to be ensured that HTTP requests are serviced with a minimum response time. × Customers View Its considered to be rude if service provider makes his customers wait, especially on the web.— × Scalability: the ability of a site to increase in size as demand warrants × Scale hardware vertically or horizontally × Improve processing architecture of the site web server software Web server software includes a series of complex tools and programs that come together to create and manage a Web server. These tools range from programming language protocols to file transfer protocol programs, which allow programmers to customize their Web servers and provide unique experiences for their users from each of their Web pages.