You are on page 1of 22

A LIBRARY SYSTEM DESIGN REQUIREMENT SPECIFICATION USING UML BY KWESIGA ABSOLOM

REG.NO. BIS / 41102 / 91 / DU

KAMPALA INTERNATIONAL UNIVERSITY COLLEGE OF APPLIED SCIENCES AND TECHNOLOGY 3rd YEAR 2nd SEMESTER

COURSE UNIT: LECTURER :

SOFTWARE MODELING MS: NABBANJA TEDDY

List of Figures
Figure 1 showing Use Case diagram of Library System.................................................................. 8 Figure 2 showing Conceptual model.............................................................................................. 10 Figure 3 showing Class Diagram ................................................................................................... 10 Figure 4 showing Activity diagram of Library System.................................................................. 13 Figure 5 showing Sequence diagram ............................................................................................. 15 Figure 6 showing Collaboration diagram....................................................................................... 19

Table of Contents

Contents
List of Figures ................................................................................................................................ 2 Table of Contents........................................................................................................................... 3 Graphical Notion Used .................................................................................................................... 4 1.0 Introduction ............................................................................................................................... 5 1.1 Purpose ...................................................................................................................................... 5 1.2 Overview statement ................................................................................................................... 5 1.3 Goal ........................................................................................................................................... 6 1.3.1 Specific objectives .............................................................................................................. 6 1.4 Requirements ............................................................................................................................. 6 2.0 Use case model .......................................................................................................................... 7 2.0.1 Course of event in Use Case diagram of the Library system ............................................. 9 2.0.2 Course of event in Activity diagram of the Library system ............................................. 13 2.0.3 Course of event in sequence diagram of the Library system ............................................ 14 2.1 Operation Contracts for the Library system ............................................................................ 16 2.1.1 Contract: Borrow a book .................................................................................................. 16 2.1.2 Contract: Return Book...................................................................................................... 16 2.1.3 Contract Library system ................................................................................................... 17 2.1.4 Contract: Pay fine fee (amount) ....................................................................................... 18 2.1.5 Contract: Renew lending .................................................................................................. 18 Glossary ......................................................................................................................................... 20 References ..................................................................................................................................... 22

Graphical Notation Used

Notation of Use Case Diagram

Package

Notation of Class Diagram

Notation of Sequence Diagram

1.0 Introduction Borrowing books, returning books or viewing the available books within a Library is currently done manually where members have to go to the Library and check the available books at the Library. Members check the list of books available and borrow the books if the book is a borrow book otherwise it is of waste for the member to come to the library to come to check for the books if the member doesnt get the book. Then the librarian checks the member id and allows the member to check out the book and the librarian then updates the member database and also the books database. This takes at least one to two hours if the member is available at the near by place otherwise it may take more time. This project illustrates the system requirements of a Library System. This system would be used by members who may be students or professors and others to check the availability of the books and borrow the books, and by the librarian to update the databases therefore, in this document there will be need to illustrate and develop a mechanism to provide this flexibility and customization. Using an iterative development strategy, this project will proceed through requirements, object-oriented analysis, design, and implementation. 1.1 Purpose This system manages all the happenings of the Library. Book transactions including Book Registration, Students Registration, Book Issuing, Current Status of a particular books and many others can be very easily handled by this module. Overall this system can be very helpful and it can make things easier. 1.2 Overview statement Project is related to library management which provides reading services to its members. Any person can become a member of the library by filling a prescribed form. They can get the book issued, so that they cab take home and return them.

1.3 Goal The general goal is to increase checkout automation, to support faster, better and effective library services and business processes. 1.3.1 Specific objectives Quick checkout for library members Fast and accurate library business routines sales analysis Automation of book transactions.

1.4 Requirements Books and Journals: The library contains both books and journals. It may have several copies of the same book. Some of the books are for short term loans only. All other books may be borrowed by any library member for a time frame of say 3 weeks. Only members of staff may borrow journals. Members of the library can normally borrow up to 6 items at a time, but members of staff may borrow up to 12 items at a time. New books and journals arrive regularly and sometime disposed of; the catalogue needs to be updated. The current years journals are sent away to be bound at the end of each year. Borrowing: It is essential that the system keeps track of when books and journals are borrowed and returned. The new system should produce reminders when a book is overdue. It may be desirable to allow users to extend their loans if the book is not reserved. The system enforces the rules for borrowing given above. Browsing: The system should allow users to search for a book on a particular topic or by a particular author etc. The user should then be able to check if the book is on loan and if so to reserve the book. Other requirement artefacts for the intended project will include: Use case model Glossary (Data repository) Conceptual model System sequence, activity and collaboration diagrams.

2.0 Use case model This is a set of all written use cases; it is a model of the system's functionality and environment. It may optionally include a UML use case diagram to show the names of use cases and actors, and their relationships. This gives a nice context diagram of a system and its environment. To improve the understanding of requirements, use cases are created to receive narrative descriptions of the requested software system. To identify use cases, two approaches are entangled: Actor-based method: Identify the actors related to a system or organization. For each actor, identify the processes they initiate or participate in.

Event-based method: Identify the external events that a system must respond to. Relate the events to actors and use cases.

Applying the actor-based method for identifying the appropriate use cases in the Library system, the following actors and use cases were found: Members of staff Members of the library Users

Figure 1 showing Use

Case diagram of Library System

2.0.1 Course of event in Use Case diagram of the Library system 1. When a member arrives to the library, the member gets to be checked by the library guard. 2. The member goes to the reception for identification purposes or information inquiry. 3. The member goes for research by browsing for a particular book, topic or author to check whether a copy of the book is available. 4. The member sometimes browses because the system keeps track of when books and journals are borrowed and returned. 5. The member can borrow a copy of a book and return it in time to the librarian if not returned in the due date; the fine has to be paid to the librarian.

Figure 2 showing Conceptual

model

Figure 3 showing Class

Diagram

Mapping of the classes within the Library System Class diagram in an Object Oriented programming language. Class Member public class member { private string memberName; private int memberID; private string address; public bool borrowBook { } public bool returnBook { } } Class Librarian public class Librarian { private int librarianID; public bool returnBook { } public bool checkFine { } }

Class Copy public class Librarian { private int copyID; private date dueDate; public bool takeAcopy { } } Class Book public class Book { private string bookID; private string availability; } Class Status public class Status { private string bookID; private string bookTitle; private int cat.No; }

2.0.2 Course of event in Activity diagram of the Library system A starts when a member gets checked. In this situation, theres need to show identification if member has or register with the system. If user is a member, theres access to browsing, borrowing and returning library materials within the system then the member checks out and goes in case of library transactions satisfaction. If user isnt a member, theres need for registering in order to be approved membership thus access library transactions. If not with all, the member quits the system.
Figure 4 showing Activity

diagram of Library System

2.0.3 Course of event in sequence diagram of the Library system


1) A member gets checked 2) Allows the member to enter

3)

Inquires

information

or

shows 4)

Approved is a member and ready to research (browse) for books

identification or registers

5)

Borrows copy of book

6)

Ok to borrow

8)

Borrow

7)

Records the book status and return date

9)

Return copy of book

10)

Check the return date

12)

Pay fine

11)

If not returned in due date, pay fine

13)

Check out and go

Sequence diagram of a member borrowing a book in the Library System


Figure 5 showing Sequence

diagram

2.1 Operation Contracts for the Library system 2.1.1 Contract: Borrow a book
Contract name Actors Summary Precondition Description Borrow a book Member, Librarian The Member borrows a book from the system The Member has no old debts to the system The Member chooses a book that is not already lent and that s/he does not own. The Librarian assigns the Member as the borrower of that book and also states a deadline for returning the book. The Member has successfully borrowed the book 1. If the Member has a due to pay, the Member can pay it (see Pay the fine usecase) and try again. 2. The Member owns the book. 3. The book is already lent. Pay fine fee

Postcondition Exceptions

Used use cases

2.1.2 Contract: Return Book


Contract name Responsibility Type Cross reference Note Exception Output Pre-condition Post-condition Return Book Update return book System R 3.5 A book should be in good state when returned. If the return date gets expired, extra charges Increase in book number Deduction of borrowers card Less books and journal available Books increased in the bank

2.1.3 Contract Library system


Contract name Responsibility Library system 1. 2. 3. 4. 5. Type Cross reference Usecase Exceptions Output Pre-condition Post-condition System System functions Lend book the book not returned in time the fine is paid and if the library fine is not paid, dont lend book Reference book borrowed 1. pay library fine to access library 2. register to borrow book. -borrow book -use library Borrowing books Return books Pay fine fee Receive payment Renew membership

2.1.4 Contract: Pay fine fee (amount)


Contract name Responsibility Pay fine fee(amount) The Member pays a certain amount of his/her debts to the System Type Crossreference Note Exceptions System R1.3 Library fine fee is paid when the return date expires. The member has no debts to pay If the library card expires, no access If the library card valid, payment allowed Output Precondition post condition Issuing receipts Registered member Payment created Payment associates with library use duration

2.1.5 Contract: Renew lending


Contract name Responsibility Type CrossReference Note Exception Output Pre-condition Post-condition Renew lending Updating system by extending date system R 3.4 Renewing is allowed only twice If the book is renewed twice, no renew again. Retain the book User has the book Return date changed User and bookbank state remains the same.

Collaboration diagram of a member borrowing a book in the Library System


Figure 6 showing Collaboration

diagram

Glossary Term Activity diagram Definition and Information A diagram that describes procedural logic, business process or work flow. An activity diagram contains a number of Activities and connected by Control Flows and Object Flows.

Activity Actor

Carrying out behavior in a State machine diagram. A role that a user takes when invoking a use case. Also see actor modeling.

Artifact

Items that model physical pieces of information in your system, such as a user's manual, training material, or password file.

Attribute

A significant piece of data owned by a Class, often containing values describing each instance of the class. Besides the attribute name and a slot for the attribute value, an attribute may have specified Visibility, Type, Multiplicity, Default value, and Property-string.

Class

The

primary

declarative

construct

of

Object-Oriented

Programming; a cohesive unit of Attributes and Operations; a compile-time template for an Object.

Class diagram

A type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes and the relationships between the classes.

Constraint

Natural language, programming language or Object Constraint Language Boolean condition which may not be false if a Class is to be considered valid.

Event

When it occurs on an Object it may cause a Transition in a State machine diagram.

Operation

The signature of a Method of a Class; consists of the Operation Name, Visibility, Parameter list, Return Type, and Propertystring.

Operation contract Use case

Identifies system state changes when an operation happens.

A technique for capturing functional requirements of systems.

References Books: 1. Component-based product line engineering with UML by Colin Atkinson 2. Enterprise modeling and computing with UML by Peter Rittgen 3. Using UML: software engineering with objects and components by Perdita Stevens, R. J. Pooley 4. UML and the Unified Process by Liliana Favre Internet: 1. http://www.blissit.org/library.htm 2. http://www.rfidguardian.org/index.php/RFID_Guardian_Use-Cases_Library 3. http://www.ksl.stanford.edu/people/pp/papers/PinheirodaSilva_IMKB_2000.pdf 4. http://julius88.weebly.com/uploads/3/2/8/9/3289949/a_library_system.doc 5. http://www.comp.dit.ie/rlawlor/Soft_Eng/UML_and_Rose/Using%20UML%20library% 20handout%20diagrams.pdf 6. http://en.wikipedia.org/wiki/Glossary_of_Unified_Modeling_Language_terms

You might also like