Software Engineering
Software Engineering
Software Engineering
The SE VLabs Institute has been recently setup to provide state-of-the-art research facilities in the field of
Software Engineering. Apart from research scholars (students) and professors, it also includes quite a large
number of employees who work on different projects undertaken by the institution.
As the size and capacity of the institute is increasing with the time, it has been proposed to develop a Library
Information System (LIS) for the benefit of students and employees of the institute. LIS will enable the
members to borrow a book (or return it) with ease while sitting at his desk/chamber. The system also enables a
member to extend the date of his borrowing if no other booking for that particular book has been made. For the
library staff, this system aids them to easily handle day-to-day book transactions. The librarian, who has
administrative privileges and complete control over the system, can enter a new record into the system when a
new book has been purchased, or remove a record in case any book is taken off the shelf. Any non-member is
free to use this system to browse/search books online. However, issuing or returning books is restricted to valid
users (members) of LIS only.
The final deliverable would a web application (using the recent HTML 5), which should run only within the
institute LAN. Although this reduces security risk of the software to a large extent, care should be taken no
confidential information (ex : passwords) is stored in plain text.
Identification of functional requirements
The above problem statement gives a brief description of the proposed system. From the above, even without
doing any deep analysis, we might easily identify some of the basic functionality of the system:
New user registration: Any member of the institute who wishes to avail the facilities of the library has to
register himself with the Library Information System. On successful registration, a user ID and password would
be provided to the member. He has to use this credentials for any future transaction in LIS.
Search book: Any member of LIS can avail this facility to check whether any particular book is present in the
institute's library. A book could be searched by its:
Title
Authors name
Publisher's name
User login: A registered user of LIS can login to the system by providing his employee ID and password as set
by him while registering. After successful login, "Home" page for the user is shown from where he can access
the different functionalities of LIS: search book, issue book, return book, reissue book. Any employee ID not
registered with LIS cannot access the "Home" page -- a login failure message would be shown to him, and the
login dialog would appear again. This same thing happens when any registered user types in his password
wrong. However, if incorrect password has been provided for three time consecutively, the security question
for the user (specified while registering) with an input box to answer it are also shown. If the user can answer
the security question correctly, a new password would be sent to his email address. In case the user fails to
answer the security question correctly, his LIS account would be blocked. He needs to contact with the
administrator to make it active again.
Return book: A book is issued for a finite time, which we assume to be a period of 20 days. That is, a
book once issued should be returned within the next 20 days by the corresponding member of LIS.
After successful return of a book, the user account is updated to reflect the same.
Reissue book: Any member who has issued a book might find that his requirement is not over by 20
days. In that case, he might choose to reissue the book, and get the permission to keep it for another 20
days. However, a member can reissue any book at most twice, after which he has to return it. Once a
book has been successfully reissued, the user account is updated to reflect the information.
In a similar way we can list other functionality offered by the system as well. However, certain features
might not be evident directly from the problem system, but which, nevertheless, are required. One such
functionality is "User Verification". The LIS should be able to judge between a registered and non-
registered member. Most of the functionality would be available to a registered member. The "New
User Registration" would, however, be available to non-members. Moreover, an already registered user
shouldn't be allowed to register himself once again.
Having identified the (major) functional requirements, we assign an identifier to each of them [v] for
future reference and verification. Following table shows the list:
# Requirement Priority
R1 New user Registration High
R2 User Login High
R3 Search Book High
R4 Issue Book High
R5 Return Book High
R6 Reissue Book Low
One point to note here is that a book is likely to have multiple copies in the library. Therefore, one might wish
to have a '# of copies' attribute for the "Book" entity set. However, that won't allow us to differentiate among
the different copies of book bearing same title by same author(s), edition, and publisher. The approach that we
have taken is to uniquely identify each book even though they are copies of the same title.
To buy any new book an order is to be placed to the distributor. This task is done by the librarian. Therefore,
"Librarian" and "Distributor" are two other entities playing roles in this system.
Having identified the key entities, we could now relate them with each other. Let us consider the entity sets
"Member" and "Book". A member can issue books. In fact, he can issue multiple books up to a finite number
say, N. A particular book, however, could be issued by a single member only. Therefore, we have a one-to-
many mapping from "Member" to "Book" entity sets. This relationship between "Member" and "Book" entity
sets is pictorially depicted
Exercise :
From the following problem statement identify the possible entity sets, their attributes, and relationships.
SE VLabs Inc. is a young company with a few departments spread across the country. As of now, the company
has a strength of 200+ employees.
Each employee works in a department. While joining, a person has to provide a lot of personal and professional
details including name, address, phone #, mail address, date of birth, and so on. Once all these information are
furnished, a unique ID is generated for each employee. He is then assigned a department in which he will work.
There are around ten departments in the company. Unfortunately, two departments were given same names.
However, departments too have ID's, which are unique.
The above use case lets an already registered member of the LIS to login to the system and possible use it's
various features. If the user provides a correct pair of (<user_id>, <password>) then he can access his home
page. However, if login credentials are incorrect, an error message is displayed to him. Figure 1 shows its
pictorial representation.
The above figure also depicts extension of a use case. "Answer security question" is not a use case by itself, and
is not invoked in a "normal" flow. However, when a member is trying to login, and provides incorrect
(<user_id>, <password>) for three consecutive times, he is asked the security question that was set during
registration. If user can answer the question correctly, the password is send to his email address. However, if
the user fails to answer the security question correctly, his account is temporarily blocked. Details of the
concerned use case extension is shown in table 5.
In order to issue a book, the availability of the book has to be checked. Also, the system needs to verify whether
another book could be issued to the current user. These are shown in figure 2 by the «include» relationship
among the use cases. The maximum # of books that can be issued to a user depends on whether he is a student
or a professor. So, "Verify issue count" is a general use case, which has been specialized by "Verify student
issue count" and "Verify professor issue count" use cases. These have been represented by the "generalization"
relationship in figure .
In the above scenario "Member" is the primary actor who triggers the "Issue book" use case. "Library staff" is a
secondary actor here.
Based on conceptual modeling and domain knowledge we already had identified a list of
classes. We present them here once again:
Member ,Book , Transaction (of books) , Librarian , Employee , Book Inventory , Distributor ,Order
Order Line Item , Payment , Invoice
The "LIS" class consists of several modules: "RegistrationManager", "IssueManager" "ReturnManager", and
"PurchaseManager". Their "composition" relationship with "LIS" indicates that any of these individual modules
wouldn't exist without the existence of "LIS". The "IssueManager" class is responsible for issue and reissue of
books while considering the two-times reissue constraint placed on a book.
The relation between "IssueManager" class and "Book" class is shown as "weak dependency". This is due to
the reason that the "IssueManager" class do not require a "Book" as it's member variable. Rather, when an user
has issued a book, the concerned method in "IssueManager" just needs to update the status of the corresponding
book. No instance of "Book" needs to be created. The arrow from "IssueManager" to "Book" indicates that only
the former knows about the "Book" class. The relationship between "PurchaseManager" and "Distributor" is,
however, not a weak dependency. The "PurchaseManager" class has a member variable of type "Distributor",
which keeps track of the distributor selected for the current purchase.
Exercise:-
Draw a context-level DFD to depict the typical user authentication process used by any system. An user gives
two inputs -- user name and password.