Se Lab Mannual
Se Lab Mannual
LAB MANUAL
SOFTWARE ENGINEERING
COURSE CODE: BCSE2355
1
Sr no. List of Lab Experiments
1. ER Diagram of Library of management system.
2. Data Flow Diagram of Library Management System.
2
Experiment – 01
E-R Diagram of Library Management System
Introduction
:-
The Library
Management
System consist
of various
entities
3
and their
attributes that
helps in
understanding
the basic
functioning of a
library. Any
person, who
wants to issue a
book from
library must
4
have a library
id, which is
issued by
the key librarian
of the library.
It is the work of
librarian to
issue books to
the library
members and
seek fine from
5
them in case of
late submission
of any book. His
other major
work is to
maintain the
central
library database
and to update it
when required.
6
Introduction
:-
The Library
Management
System consist
of various
entities
and their
attributes that
helps in
7
understanding
the basic
functioning of a
library. Any
person, who
wants to issue a
book from
library must
have a library
id, which is
issued by
8
the key librarian
of the library.
It is the work of
librarian to
issue books to
the library
members and
seek fine from
them in case of
late submission
9
of any book. His
other major
work is to
maintain the
central
library database
and to update it
when required.
Introduction:
The Library Management System consist of various entities and their
attributes that helps in understanding the basic functioning of a
library. Any person, who wants to issue a book from library must
have a library id, which is issued by the key librarian of the library. It
is the work of librarian to issue books to the library members and seek
fine from them in case of late submission of any book. His other
major work is to maintain the central library database and to update it
when required.
10
Entity Details:
User:
o Library ID – A unique id to login for each member.
o Name – Name of the library member.
o Mobile no – Phone numb er of library members.
o Address – Address of library member.
o No. of Books issued – A user cannot issue more than 3 book
a week.
Admin:
o Admin ID – A unique ID for each admin i.e., librarian
o Name – Librarian name.
o Phone no – Phone no. of librarian
Login:
o Login ID - Library id is case of user and admin ID in case of
administrator.
o Password – A 6-digit security code for logging into library
portal.
Book:
o Record ID – each record has its own unique ID.
o Add record – for adding any new information.
o Update record – for updating existing information.
o Delete record – for deleting the data.
o Total books available – it tells the total number of books
available in record at any given time.
11
Library ID – a
unique id to login
for each member
o Name – name
of the library
member
o Mobile no. –
phone no. of
library member
12
o Address –
address of library
member
o Branch –
course name,
e.g. B.Sc., B-tech
etc.
o No. of books
issued – a user
cannot issue
more than 3
13
book a week
Library ID – a
unique id to login
for each member
o Name – name
of the library
member
o Mobile no. –
phone no. of
library member
14
o Address –
address of library
member
o Branch –
course name,
e.g. B.Sc., B-tech
etc.
o No. of books
issued – a user
cannot issue
more than 3
15
book a week
ER Diagram
Description
:-
ER Diagram Description:
This ER diagram for Library Management System consist of 5
entities which are ‘user’, ‘admin’, ‘login’, ‘book’, ‘book record’
with their key attributes ‘library id’, ‘admin id’, ‘login id’, ‘book
barcode no’, ‘record id’ respectively.
These 5 entities are linked together in 6 relationships which are
‘borrow’, ‘get books issued from’, ‘issued by’, ‘maintains’,
‘have to’.
Every user as well as admin has to log in through a log id and
password to enter into the library management system portal.
Every user can borrow at least 3 books in a week that has to be
issued from the admin.
The major work of admin is to maintain the book record by
adding, updating or deleting the record on a timely basis.
16
ER Diagram:
17
Experiment – 02
Data flow diagram of Library management
system
18
Level 0 of Data flow Diagram
19
these processes. Data store is used to represent this type information.
20
Experiment – 03
Activity Diagram of Library Management
System.
21
The activity diagram used to describe flow of activity
through a series of actions. Activity diagram is a
important diagram to describe the system. The activity
described as an action or operation of the system.
Experiment – 04
22
Use Case Diagram of Library Management
System.
23
24
Experiment – 05
Write a C program to find whether the roots of
quadratic equation are real, imaginary, equal.
#include<stdio.h>
#include<math.h> // it is used for math calculation
#include<conio.h>
void main()
{
float x, y, z, det, root1, root2, real, img;
printf("\n Enter the value of coefficient x, y and z: \n ");
scanf("%f %f %f", &x, &y, &z);
// define the quadratic formula of the nature of the root
det = y * y - 4 * x * z;
// defines the conditions for real and different roots of the quadratic
equation
if (det > 0)
{
root1 = (-y + sqrt(det)) / (2 * x);
root2 = (-y + sqrt(det)) / (2 * x);
printf("\n Value of root1 = %.2f and value of root2 = %.2f", root1,
root2);
}
// elseif condition defines both roots ( real and equal root) are equal
in the quadratic equation
25
else if (det == 0)
{
root1 = root2 = -y / (2 * x); // both roots are equal;
printf("\n Value of root1 = %.2f and Value of root2 = %.2f",
root1, root2);
}
// if det < 0, means both roots are real and imaginary in the
quadratic equation.
else {
real = -y / (2 * x);
img = sqrt(-det) / (2 * x);
printf("\n value of root1 = %.2f + %.2fi and value of root2 =
%.2f - %.2fi ", real, img, real, img);
}
getch();
}
26
Experiment – 06
Perform boundary Vave analysis on the roots of
quadratic equation.
#include <bits/stdc++.h>
using namespace std;
void nature_of_roots(int a, int b, int c)
{
int D = b * b - 4 * a * c;
27
cout << "Equal Roots" << endl;
}
28
b = 50;
c = 50;
}
else if (testcase == 3) {
a = 50;
b = 50;
c = 50;
}
else if (testcase == 4) {
a = 99;
b = 50;
c = 50;
}
else if (testcase == 5) {
a = 100;
b = 50;
c = 50;
}
else if (testcase == 6) {
a = 50;
b = 0;
c = 50;
}
else if (testcase == 7) {
a = 50;
b = 1;
c = 50;
29
}
else if (testcase == 8) {
a = 50;
b = 99;
c = 50;
}
else if (testcase == 9) {
a = 50;
b = 100;
c = 50;
}
else if (testcase == 10) {
a = 50;
b = 50;
c = 0;
}
else if (testcase == 11) {
a = 50;
b = 50;
c = 1;
}
else if (testcase == 12) {
a = 50;
b = 50;
c = 99;
}
else if (testcase == 13) {
30
a = 50;
b = 50;
c = 100;
}
cout << "\t" << testcase << "\t"
<< a << "\t" << b << "\t"
<< c << "\t";
nature_of_roots(a, b, c);
cout << endl;
testcase++;
}
}
// Driver Code
int main()
{
checkForAllTestCase();
return 0;
}
31