LabbbbSoftware Engineering Lab
LabbbbSoftware Engineering Lab
SOFTWARE ENGINEERING
LABORATORY
(V semester of B.Tech)
of
SOFTWARE ENGINEERING
LABORATORY
PREPARED BY
Mr. D .Bhaskar
1
SCHOOL OF COMPUTING
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
2
LAB MANUAL
SUBJECT NAME: SOFTWARE ENGINEERING
LABORATORY
SUBJECT CODE:BCS5L2
Regulation 2015
(2016-2017)
3
BCS5L2-SOFTWARE ENGINEERING LABORATORY
LIST OF EXPERIMENTS
1. Library System
3. Quiz System
6. Stock maintenance
4
CONTENT
1 Library System 6
3 Quiz System 13
5
EX NO 1: LIBRARY SYSTEM
AIM:
ALGORITHM:
MODULE 1:
• Provide a user interface for getting the user’s login details.
• Verify login ID and if correct, provide access to the library database.
MODULE 2:
• Provide a search mechanism to search for a particular book.
• Input the book name and the author’s name.
MODULE 3:
• Get the book details from the database.
• Display the book details on the screen.
MODULE 4:
• Allow the user to select the book for checking out.
• Issue the book.
SEQUENCE DIAGRAM:
6
CLASS DIAGRAM:
PROGRAM:
importjava.util.Vector;
public class librarian
{
public string name;
private number idnum;
public database updates;
public Vector 1...*;
public void maintaindetails() {
7
}
}
Database.java
public class database {
public string bookname;
public string authorname;
public librarian updates;
public void updatedetails() {
}
public void maintainmembership() {
}
}
Cashier.java
importjava.util.Vector;
public class cashier {
WWW.VIDYARTHIPLUS.COM
public string studentname;
public number membershipidnum;
public Vector mystudent;
/**
*
* @element-type student
*/
public Vector pays;
public void renewmembership() {
}
public void renewbook() {
}
}Student.java
importjava.util.Vector;
public class student {
public string name;
public number idnum;
public Vector mycashier;
public Vector 1;
public cashier pays;
public void borrowbook() {
}
public void returnbook() {
}
public void fine() {
}
RESULT:
The UML diagram for library management system was generated successfully
8
Ex No : 2 COURSE REGISTRATION SYSTEM
AIM:
To generate the UML diagram for course reservation system.
ALGORITHM:
MODULE 1:
Student logs in.
Student selects the course.
MODULE 2:
It is decided whether the student is eligible to take up the course based on certain
criteria.
MODULE 3:
Student pays for course he selected.
The payment details are verified.
USECASE DIAGRAM:
9
ACTIVITY DIAGRAM:
CLASS DIAGRAM:
10
PROGRAM:
public class Student
{
public string name;
public string Registernumber;
Public Student()
{
}
}
Public class Reservation
{
Public Reservation ()
{
}
}
Public class Payment
{
public String amount;
Public Payment()
{
}
}
Public class CreditPayment extends Payment
{
WWW.VIDYARTHIPLUS.COM
34
Public CreditPayment ()
{
}
}
Public class CashPayment extends Payment
{
Public CashPayment()
{
}
}
public class Course
{
public string name
public void Course()
{
}
}
Public class subjects
{
Public String name;
Public void Subjects()
11
{
}
}
RESULT:
The UML diagram for Course reservation system was generated successfully.
12
Ex No : 3 QUIZ SYSTEM
AIM:
To generate the UML diagram for Quiz system.
ALGORITHM:
Step 1: Identify the Actors and Use cases.
In this system,the actors and use cases are:
Actors: User ,System and Database.
13
2. SEQUENCE DIAGRAM: Step 1:
Identify the objects.
In this system, the objects are: User, System and Database.
Step 2: Identify the sequence of events.
USER
SYSTEM DATABASE
14
Fig(2): Sequence diagram for Quiz System
Procedure to write the software for the Quiz System using Rational Software tool
Selecting the Software:
15
5. Click Sequence diagram->using the tool box build the sequence diagram.
6. Click Class diagram-> using the tool box build the class diagram.
Generate the coding form:
7.Right click component view -> component diagram-> open specification -> select the
stereotype as DLL-> select the language as visual basic ->switch from general tab to realizes
tab-> select the classes you created in class diagram-> right click ->Assign->Ok.
8.Right click component view -> update code form model-> the tool window for converting
diagrams to code appears->next->finish->the skeleton code in VB is generated automatically
for the class diagram designed.
16
SOURCE CODE
LOGIN FORM:
Option Explicit
LoginSucceeded = False
End
End Sub
LoginSucceeded = True
Form1.Show
Me.Hide
Else
txtPassword.SetFocus
End If
Else
17
End If
End Sub
Form 1:
Form2.Show
Me.Hide
End Sub
Form5.Show
Me.Hide
End Sub
Form6.Show
Me.Hide
End Sub
Form 2:
Dim a As Integer
Text1.Text = ""
18
Text1.Text = Val(Text1.Text) + 10
Else
Text1.Text = Val(Text1.Text) + 0
End If
Frame2.Visible = True
Frame1.Visible = False
End Sub
Text1.Text = Val(Text1.Text) + 10
Else
Text1.Text = Val(Text1.Text) + 0
End If
Form3.Show
Me.Hide
End Sub
Frame2.Visible = False
End Sub
19
Private Sub Timer1_Timer()
Me.Hide
Form1.Show
End Sub
Form 3:
Text1.Text = Val(Text1.Text) + 10
Else
Text1.Text = Val(Text1.Text) + 0
End If
Frame2.Visible = True
Frame1.Visible = False
End Sub
Text1.Text = Val(Text1.Text) + 10
20
Else
Text1.Text = Val(Text1.Text) + 0
End If
Form8.Show
Me.Hide
End Sub
Frame2.Visible = False
End Sub
RESULT FORM:
Dim db As Database
Dim rs As Recordset
rs(0) = lable2.Caption
rs(1) = Text1.Text
rs(2) = Text2.Text
AddNew
End Sub
21
Private Sub Command2_Click()
End
End Sub
End If
End Sub
MDIForm1.Label1.Caption = ""
MDIForm1.Picture1.Visible = False
Set rs = db.OpenRecordset("res")
End Sub
22
OUTPUT:
LOGIN FORM :
FORM 1:
23
FORM 2:
24
FORM 3:
25
26
RESULT FORM:
RESULT:
26
27
ALGORITHM:
MODULE 1:
The system gets the application registration form.
The system gets the data from the user and checks for validity.
MODULE 2:
If the form is valid then the system checks for correction of data with respect to
the respective colleges database.
The form checks for eligibility criteria.
MODULE 3:
If the form is valid and eligible and there is no reduction in the given data then the
unique registration id, and hall ticket is issued to the applicant.
If the form entries are invalid then the application form is rejected.
USE CASE DIAGRAM:
27
28
ACTIVITY DIAGRAM:
Program:
public class applicant
{
private number app_id;
private string app_name;
public validation theValidation[];
/**
@roseuid 3F0925F102AF
*/
public applicant(){
}
28
29
RESULT:
The UML diagram for Studen Marks Analyzing system was generated.
29
30
AIM :
ALGORITHM:
MODULE 1:
The user logs into the website using their id and password.
If the user is a new user, create an id and password by filling the sign up form.
MODULE 2:
After logging the system displays the form in which the user is allowed to select
the destination and source place.
The user can also select the date.
The system displays available trains.
MODULE 3:
The user can select the required one and give the number of tickets, class.
The system check for the availability.
If it is available then book the ticket by filing the details about individuals such as
name, age, gender etc.
MODULE 4:
Make the payment either by card or through netbanking.
After booking the ticket, print the ticket.
30
31
31
32
CLASS DIAGRAM:
ACTIVITY DIAGRAM:
PROGRAM:
33
34
{
}
WWW.VIDYARTHIPLUS.COM
43
/**
@roseuid 3F0924A9009C
*/
public void validate()
{
}
}
public class Bank
{
private string name;
private string cardno;
public account theAccount[];
/**
@roseuid 3F0927E8004E
*/
public Bank()
{
}
/**
@roseuid 3F0924D7031C
*/
public void validateno()
{
}
/**
@roseuid 3F0924E400CB
*/
public void opname2()
{
}
}
public class account
{
private string cust_id;
private string cust_name;
/**
@roseuid 3F092808036B
*/
public account()
WWW.VIDYARTHIPLUS.COM
34
35
44
{
}
/**
@roseuid 3F09251100AB
*/
public void withdraw()
{
}
}
public class ticket
{
private string dest;
private string source;
private string time;
private string date;
private string trainname;
public Authenticate theAuthenticate;
public Bank theBank[];
/**
@roseuid 3F09281000EA
*/
public ticket()
{
}
/**
@roseuid 3F09259C000F
*/
public void book()
{
}
/**
@roseuid 3F09259F00BB
*/
public void cancel()
{
}
}
public class admin
{
WWW.VIDYARTHIPLUS.COM
45
private string name;
/**
35
36
@roseuid 3F092835003E
*/
public admin()
{
}
/**
@roseuid 3F0928150109
*/
public admin()
{
}
/**
@roseuid 3F09253C0271
*/
public void maintaindatabase()
{
}
/**
@roseuid 3F092550007D
*/
public void updatedatabase()
{
}
}
/**
void Admin.getdetails(){
}
*/
RESULT:
The UML diagram for Online ticket reservation system was generated successfully.
36
37
ALGORITHM
MODULE 1:
The supplier gets the list of products required from the warehouses.
The products are supplied based on the received list.
MODULE 2:
The warehouses stores the products sent by the supplier.
The warehouse manager is responsible for the mangement of the products in the
warehouses.
MODULE 3:
The supermarket sends a product order to the warehouses.
If the products are available, then the products are delivered to the supermarket.
37
38
USECASE DIAGRAM:
ACTIVITY DIAGRAM:
38
39
CLASS DIAGRAM:
PROGRAM:
40
41
}
/**
* @roseuid 4D6F20BE0290
*/
public void FurnishDetails()
{
}
/**
* @roseuid 4D6F20C40261
*/
public void initiateproductorder()
{
}
}
RESULT:
The stock management system was successfully described using UML diagrams.
41