SE File
SE File
LABORATORY FILE
SOFTWARE ENGINEERING
(BCS-651)
Name
Roll No.
Section-Batch
To make IMSEC an Institution of Excellence for empowering students through technical education,
incorporating human values, and developing engineering acumen for innovations and leadership
skills to upgrade society
Mission 3: To promote industry interactions and cultivate young minds for entrepreneurship.
Mission 4: To create a conducive learning ecosystem and research environment on a perpetual basis to
develop students as technology leaders and entrepreneurs who can address tomorrow's societal needs.
Mission 1: To provide quality education in the theoretical and applied foundations of Computer Science
& Engineering.
Mission 2: To Conduct research in Computer Science & Engineering, resulting in innovations, thereby
nurturing entrepreneurial thinking.
Mission 3: To inculcate team building skills and promote life-long learning with high societal and ethical
values.
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Graduate Will:
PEO1: Possess core theoretical and practical knowledge in Computer Science and Engineering for
successful career development in industry, pursuing higher studies or entrepreneurship.
PEO2: Ability to imbibe lifelong learning for global challenges to impact society and the environment.
PEO3: To demonstrate work productivity, leadership and managerial skills, ethics, and human
values in a progressive career path.
PEO4: To exhibit communication skills and collaborative skill plans and participate in multidisciplinary
Computer Science & Engineering fields.
PSO1: To analyze and demonstrate the recent engineering practices, ethical values, and strategies
for real-time world problems to meet the challenges for the future.
PSO2: To develop an adaptive computing system using computational intelligence strategies and
algorithmic design to address diverse data analysis and machine learning challenges.
PROGRAM OUTCOMES
Engineering Graduates will be able to:
1. Students are advised to come to the laboratory at least 5 minutes before (to the starting time),
those who come after 5 minutes will not be allowed into the lab.
2. Plan your task properly much before to the commencement, come prepared to the lab with
the synopsis / program / experiment details.
Laboratory observation notes with all the details (Problem statement, Aim, Algorithm,
Procedure, Program, Expected Output, etc.,) filled in for the lab session.
Laboratory Record updated up to the last session experiments and other utensils (if
any) needed in the lab.
4. Sign in the laboratory login register, write the TIME-IN, and occupy the computer system
allotted to you by the faculty.
5. Execute your task in the laboratory, and record the results / output in the lab observation
note book, and get certified by the concerned faculty.
6. All the students should be polite and cooperative with the laboratory staff, must maintain
the discipline and decency in the laboratory.
7. Computer labs are established with sophisticated and high end branded systems, which
should be utilized properly.
8. Students / Faculty must keep their mobile phones in SWITCHED OFF mode during the lab
sessions. Misuse of the equipment, misbehaviors with the staff and systems etc., will attract
severe punishment.
9. Students must take the permission of the faculty in case of any urgency to go out; if anybody
found loitering outside the lab / class without permission during working hours will be treated
seriously and punished appropriately.
10. Students should LOG OFF/ SHUT DOWN the computer system before he/she leaves the
lab after completing the task (experiment) in all aspects. He/she must ensure the system / seat
is kept properly.
DETAILS OF THE EXPERIMENTS CONDUCTED
INDEX
10
STUDY AND EVALUATION SCHEME
Course Course
Teaching Scheme Credits Assigned
Code Name
Theory Practical Tutorial Theory Practical Tutorial Total
BCS-601(T)
Software
B CS-651 (P)
Engineering 03 02 01 03 01 01 05
(70 (50
Marks) Marks)
IMS Engineering College
NH-09, Adhyatmik Nagar, Near Dasna, Distt. Ghaziabad, U.P.
Tel: (0120) 4940000
Department of Computer Science and Engineering
Bloom’s
COURSE OUTCOMES
Level
K2, K4
C319.1 Identify ambiguities, inconsistencies and incompleteness from a requirements
specification and state functional and non-functional requirement
K3, K5
C319.2 Identify different actors and use cases from a given problem statement and
draw use case diagram to associate use cases with different types of
relationship
K4, K5
C319.3 Draw a class diagram after identifying classes and association among them
Graphically represent various UML diagrams and associations among them K4, K5
C319.4
and identify the logical sequence of activities undergoing in a system, and
represent them pictorially.
Able to use modern engineering tools for specification, design, K3, K4
C319.5
implementation and testing
CO-PO Matrix
Course
PO 1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
Outcome
C319.1 3 3 3 3 2 1 1 1 2 3 3 2 3 3
C319.2 3 3 3 3 2 1 2 2 2 3 3 2 3 3
C319.3 3 3 3 3 2 2 1 2 2 3 3 2 3 3
C319.4 3 3 3 3 2 1 1 1 2 3 3 2 3 3
C319.5 3 3 3 3 2 2 2 1 2 3 3 3 3 3
C319 3.0 3.0 3.0 3.0 2.0 1.4 1.4 1.4 2.0 3.0 3.0 2.2 3.0 3.0
LIST OF PROGRAMS
4. Identify the classes. Classify them as weak and strong classes and C319.3
draw the class diagram.
5. Draw the sequence diagram for any two scenarios. C319.4
Procedure:
Project Title: Food Label Reader. This page contains SRS documentation for the Food
Label Reader Web Application. The SRS is produced at the culmination of the analysis
phase. The function and performance allocated to software as part of the system
engineering are refined by establishing a complete information description, a detailed
functional description, a representation of system behavior, indication of performance
requirements, design constraints, validation criteria, and other related requirement
details. This SRS is a technical specification of requirements for the Food Label Reader
system. It describes what the proposed system should do without explaining how it will
do it. It also defines the complete external behavior of the system.
Purpose:
The main purpose of the Food Label Reader Web Application is to simplify the
understanding of food product labels for consumers. The goal is to develop a system that
can scan, read, and interpret ingredients and nutritional information from food packages
and translate them into simple, non-scientific terms. Additionally, it will describe the
effects of these components on human health and indicate safe consumption limits. This
document serves as a clear and concise guide for developers, stakeholders, and users
involved in the project.
Scope:
This document outlines the requirement specification for the Food Label Reader Web
Application. It focuses on defining the system’s behavior, modules, and functionalities.
References to external Optical Character Recognition (OCR) tools and nutritional
databases are included only as necessary to define system interfaces and dependencies.
Feasibility Study:
The feasibility study ensures that the project is practical, implementable and beneficial. It
involves the following steps:
a) Understanding the challenges faced by consumers in interpreting food labels and
ingredients lists.
b) Identifying commonly used chemical additives, preservatives, and E-numbers in
packaged food.
c) Researching publicly available food safety and health guidelines (e.g., FDA, WHO) to
determine safe consumption limits.
d) Evaluating existing tools and the need for simple, easy-to-use web applications for
real-time food label analysis.
Overview:
Food Label Reader is a web-based application designed to extract and interpret
ingredient and nutritional information from food packaging. The system uses OCR and
NLP techniques to identify and translate scientific or complex ingredient names into
everyday language, explains their purpose and health effects, and provides guidance on
tolerable intake levels. It is especially useful for health-conscious individuals, parents,
people with allergies, or anyone aiming to make informed dietary decisions.
Product Perspective:
Food Label Reader provides an end-to-end pipeline for label scanning, data extraction,
ingredient interpretation, and health-based recommendations. It integrates with existing
food safety databases and APIs. The workflow includes uploading or capturing an
image of the food label, extracting the text using OCR, processing the content with
NLP, and displaying user-friendly interpretations and warnings.
Product Functions:
The application performs the following major functions:
Label Upload – Allows users to upload or capture images of food labels.
Text Extraction – Uses OCR to extract readable text from the uploaded label.
Ingredient Interpretation – Decodes ingredients into simple language and explains
their purpose.
User Characteristics:
General Constraints:
Image processing and analysis require a stable server with moderate computational
power.
Images should be clear and readable for accurate OCR performance.
Integration with third-party APIs or databases like OpenFoodFacts or FDA datasets
may be required.
Data security and privacy must be maintained for stored user profiles and
preferences.
The system must support accessibility for differently-abled users.
Functional Requirements:
Admin Module – Manage users, system logs, databases, and access control.
Label Upload Module – Supports image upload or real-time camera capture for label
scanning.
OCR Module – Uses OCR tools (e.g., Tesseract) to extract readable text from
images.
Interpretation Engine – Converts scientific terms to layman-friendly language using
NLP and predefined mappings.
Health Analyzer Module – Evaluates ingredients against health guidelines and user
preferences.
User Dashboard – Displays reports, tracks scan history, and allows customization of
alerts/preferences.
Alert System – Warns users about allergens or ingredients exceeding safe levels.
Performance Requirements:
OCR and interpretation process should be completed within 5 seconds per label
image.
The system should support 50–100 concurrent users with minimal performance
degradation.
Text recognition accuracy must be ≥ 85% on clear images.
Ingredient interpretation accuracy should be ≥ 90% based on existing databases.
Design Constraints:
Procedure:
According to the UML specification a use case diagram is diagram that shows the
relationships among actors and use cases within a system.
Use case diagrams are often used to:
• Provide an overview of all or part of the usage requirements for a system or
organization in the form of an essential model or a business model
• Communicate the scope of a development project
• Model your analysis of your usage requirements in the form of a system use case model
Use case models should be developed from the point of view of your project
stakeholders and not from the (often technical) point of view of developers. There are
guidelines for:
1. Use Cases
A use case describes a sequence of actions that provide a measurable value to an actor. A use
case is drawn as a horizontal ellipse on a UML use case diagram.
1. Use Case Names Begin with a Strong Verb
2. Name Use Cases Using Domain Terminology
3. Place Your Primary Use Cases in The Top-Left Corner of The Diagram
4. Imply Timing Considerations by Stacking Use Cases.
Symbol
2. Actors
An actor is a person, organization, or external system that plays a role in one or more
interactions with your system (actors are typically drawn as stick figures on UML Use Case
diagrams).
1. Place Your Primary Actor(S) In the Top-Left Corner Of The Diagram
2. Draw Actors to The Outside of A Use Case Diagram
3. Name Actors with Singular, Business-Relevant Nouns
4. Associate Each Actor with One Or More Use Cases
5. Actors Model Roles, Not Positions
6. Use <> to Indicate System Actors
7. Actors don ‘t Interact With One Another
8. Introduce an Actor Called ―Time‖ to Initiate Scheduled Events
Symbol
3. Relationships
There are several types of relationships that may appear on a use case diagram:
• An association between an actor and a use case
• An association between two use cases
• A generalization between two actors
• A generalization between two use cases
Associations are depicted as lines connecting two modelling elements with an optional open
headed arrowhead on one end of the line indicating the direction of the initial invocation of the
relationship. Generalizations are depicted as a close-headed arrow with the arrow pointing
towards the more general modelling element.
1. Indicate an Association between an Actor and a Use Case If the Actor Appears Within the
Use Case Logic
2. Avoid Arrowheads on Actor-Use Case Relationships
3. Apply <> When You Know Exactly When to Invoke the Use Case
4. Apply <> When A Use Case May Be Invoked Across Several Use Case Steps
5. Introduce <> associations sparingly
6. Generalize Use Cases When a Single Condition Results in Significantly New Business
Logic
7. Do Not Apply <>, <>, or <>
8. Avoid More Than Two Levels of Use Case Associations
9. Place an Included Use Case to The Right of The Invoking Use Case
10. Place an Extending Use Case below the Parent Use Case
11. Apply the ―Is Like‖ Rule to Use Case Generalization
12. Place an Inheriting Use Case Below the Base Use Case
13. Apply the ―Is Like‖ Rule to Actor Inheritance
14. Place an Inheriting Actor Below the Parent Actor
Symbol
Action Flow: Action flows, also called edges and paths, illustrate the transitions from one
action state to another. They are usually drawn with an arrowed line.
Object Flow
Object flow refers to the creation and modification of objects by activities. An object flow
arrow from an action to an object means that the action creates or influences the object. An
object flow arrow from an object to an action indicates that the action state uses the object.
A diamond represents a decision with alternate paths. When an activity requires a decision
prior to moving on to the next activity, add a diamond between the two activities. The outgoing
alternates should be labelled with a condition or guard expression. You can also label one of
the paths "else."
Guards
In UML, guards are a statement written next to a decision diamond that must be
true before moving next to the next activity. These are not essential, but are useful
when a specific answer, such as "Yes, three labels are printed," is needed before
moving forward.
Time Event
This refers to an event that stops the flow for a time; an hourglass depicts it.
Merge Event
A merge event brings together multiple flows that are not concurrent.
Output:
Class diagram in the Unified Modeling Language (UML) is a type of static structure diagram
that describes the structure of a system by showing the system's classes, their attributes,
operations (or methods), and the relationships among objects.
The class diagram is the main building block of object-oriented modeling. It is used for general
modeling of the systematic of the application, and for detailed modeling translating the models
into programming code. Class diagrams can also be used for data modeling. The classes in a
class diagram represent both the main elements, interactions in the application, and the classes
to be programmed.
In the diagram, classes are represented with boxes that contain three compartments:
i. The top compartment contains the name of the class. It is printed in bold and cantered, and
the first letter is capitalized. ii. The middle compartment contains the attributes of the class.
They are left-aligned and the first letter is lowercase.
iii. The bottom compartment contains the operations the class can execute. They are also left-aligned
20
Visibility
To specify the visibility of a class member (i.e. any attribute or method), these notations must be
placed before the member's name:
+ Public
- Private
# Protected
~ Package
* Random
Relationships:
21
A relationship is a general term covering the specific types of logical connections found on class and
object diagrams. UML defines the following relationships:
Class Diagram for Bank Management System
22
EXPERIMENT NO. -5
AIM: Draw the Sequence Diagram.
Procedure:
UML sequence diagrams model the flow of logic within the system in a visual manner, enabling
the user both to document and validate the logic, and are commonly used for both analysis and
design purposes. Sequence diagrams are the most popular UML artifact for dynamic modelling,
which focuses on identifying the behavior within your system. Sequence diagrams, along with
class diagrams and physical data models are the most important design- level models for
modern application development
Sequence diagrams are typically used to model:
1. Usage scenarios. A usage scenario is a description of a potential way the system is
used. The logic of a usage scenario may be part of a use case, perhaps an alternate course. It
may also be one entire pass through a use case, such as the logic described by the basic course
of action or a portion of the basic course of action, plus one or more alternate scenarios. The
logic of a usage scenario may also be a pass through the logic contained in several use cases.
For example, a student enrols in the university, and then immediately enrolls in three seminars.
2. The logic of methods. Sequence diagrams can be used to explore the logic of a
complex operation, function, or procedure. One way to think of sequence diagrams, particularly
highly detailed diagrams, is as visual object code.
3. The logic of services. A service is effectively a high-level method, often one that can
be invoked by a wide variety of clients. This includes web-services as well as business
transactions implemented by a variety of technologies such as CICS/COBOL or CORBA-
compliant object request brokers (ORBs).
Fig. shows the logic for how to enroll in a seminar. One should often develop a system-level
sequence diagram to help both visualize and validate the logic of a usage scenario. It also helps
to identify significant methods/services, such as checking to see if the applicant already exists
as a student, which the system must support.
23
The dashed lines hanging from the boxes are called object lifelines, representing the life span
of the object during the scenario being modeled. The long, thin boxes on the lifelines are
activation boxes, also called method-invocation boxes, which indicate processing is being
performed by the target object/class to fulfill a message.
Sequence Diagram Notation
Actor a type of role played by an entity that interacts with the subject (e.g., by exchanging
signals and data)
External to the subject (i.e., in the sense that an instance of an actor is not a part of the instance
of its corresponding subject).
Represent roles played by human users, external hardware, or other subjects.
Note that:
An actor does not necessarily represent a specific physical entity but merely a particular role
of some entity
A person may play the role of several different actors and, conversely, a given actor may be
played by multiple different person.
Lifeline
A lifeline represents an individual participant in the Interaction.
24
Activations
A thin rectangle on a lifeline) represents the period during which an element is performing an
operation.
The top and the bottom of the of the rectangle are aligned with the initiation and the completion
time respectively
Call Message
A message defines a particular communication between Lifelines of an Interaction.
Call message is a kind of message that represents an invocation of operation of target lifeline.
Return Message
A message defines a particular communication between Lifelines of an Interaction.
25
26
Duration Message
A message defines a particular communication between Lifelines of an Interaction.
Duration message shows the distance between two time instants for a message invocation.
The example below shows a simple collaboration diagram for the placing an order use case.
This time the names of the objects appear after the colon, such as: Order Entry Window
following the objectName:className naming convention. This time the class name is shown
to demonstrate that all of objects of that class will behave the same way.
An object is represented by an object symbol showing the name of the object and its class underlined, separated
by a colon:
Object_name : class_name
Links
Links connect objects and actors and are instances of associations and each link
Messages
A message is a communication between objects that conveys information with the expectation that
activity will ensue. In collaboration diagrams, a message is shown as a labelled arrow
placed near a link. The message is directed from sender to receiver The receiver must
understand the message
The association must be navigable in that direction Steps
for Creating Collaboration Diagrams
Identify behaviour whose realization and implementation is specified
Identify the structural elements (class roles, objects, subsystems) necessary to carry out
the functionality of the collaboration
Decide on the context of interaction: system, subsystem, use case and operation
Model structural relationships between those elements to produce a diagram showing the
context of the interaction
Consider the alternative scenarios that may be required
Draw instance level collaboration diagrams, if required.
Optionally draw a specification level collaboration diagram to summarize the alternative
scenarios in the instance level sequence diagrams
Procedure:
Hardware Requirements
Pentium 4 processor (2.4 GHz), 128 Mb RAM, Standard keyboard n mouse, colored monitor.
THEORY
State Chart Diagram: State chart diagrams model the dynamic behavior of individual classes
or any other kind of object. They show the sequences of states that an object goes through, the
events that cause a transition from one state to another and the actions that result from a state
change. A State chart diagram describes a state machine. State machine can be defined as a
machine which defines different states of an object and these states are controlled by external
or internal events. State chart diagrams are also used for forward and reverse engineering of a
system. However, the main purpose is to model the reactive system.
Transition
A solid arrow represents the path between different states of an object. Label the transition
with the event that triggered it and the action that results from it. A state can have a transition that
points back to itself.
Initial State
A filled circle followed by an arrow represents the object's initial state.
Final State an arrow pointing to a filled circle nested inside another circle represents the
object's final state.
HARDWARE REQUIREMENTS
Pentium 4 processor (2.4 GHz), 128 Mb RAM, Standard keyboard n mouse, colored monitor.
THEORY
Component diagrams are used to visualize the organization and relationships among components
in a system. These diagrams are also used to make executable systems. Component diagram is a
special kind of diagram in UML. The purpose is also different from all other diagrams discussed
so far. It does not describe the functionality of the system but it describes the components used
to make those functionalities.
Thus from that point of view, component diagrams are used to visualize the physical components
in a system. These components are libraries, packages, files, etc. Component diagrams can also
be described as a static implementation view of a system. Static implementation represents the
organization of the components at a particular moment. A single component diagram cannot
represent the entire system but a collection of diagrams is used to represent the whole.
The purpose of the component diagram can be summarized as –
Visualize the components of a system.
Construct executable by using forward and reverse engineering.
Component diagrams are used to describe the physical artefacts of a system. This artefact
includes files, executable, libraries, etc.
The purpose of this diagram is different. Component diagrams are used during the
implementation phase of an application. However, it is prepared well in advance to visualize the
implementation details.
Initially, the system is designed using different UML diagrams and then when the artifacts are
This diagram is very important as without it the application cannot be implemented efficiently.
A well-prepared component diagram is also important for other aspects such as application
performance, maintenance, etc.
Before drawing a component diagram, the following artifacts are to be identified clearly −
Files used in the system.
Libraries and other artifacts relevant to the application.
Relationships among the artifacts.
Component
A component is a logical unit block of the system, a slightly higher abstraction than classes. It is
represented as a rectangle with a smaller rectangle in the upper right corner with tabs or the word
written above the name of the component to help distinguish it from a class.
Interface
Dependencies
Draw dependencies among components using dashed arrows.
Port
Ports are represented using a square along the edge of the system or a component. A port is often
used to help expose required and provided interfaces of a component.
Example of Bank Management System
EXPERIMENT NO. - 9
AIM: Perform forward engineering in java. (Model to code conversion).
Procedure:
About:
Forward engineering is the process of building from a high-level model or concept to build in
complexities and lower-level details. This type of engineering has different principles in various
software and database processes. Generally, forward engineering is important in IT because it
represents the 'normal’ development process. For example, building from a model into an
implementation language. This will often result in loss of semantics, if models are more
semantically detailed, or levels of abstraction Code/Method:
Click the “Tools->Java” menu on the main menu and select “Generate Code”
Select your module from the dialog (may be Model1 here) and click "Next". To generate stub
code for all classes of your module or icon, select “Select All” and press “Next”. Select a valid
output directory, "Next".
In the "Options Setup", be sure to check both "Generate the Documentation by JavaDoc" and
"Generate empty JavaDoc". All other checkboxes should be unchecked. Then press "Next".
In "Options Setup", be sure to check " Generate the Documentation by JavaDoc", "Generate
empty JavaDoc", all other checkboxes are unchecked, "Next"
Output:
Consumer.java
/**
* Represents a Consumer who can apply for Credit.
*/
public class Consumer extends Person {
public Consumer() {
super();
}
}
Mortgage.java
/**
* Represents a Mortgage which acts as a guarantee for Credit.
*/
public class Mortgage {
public Mortgage() {
}
/**
* Represents Goods with value and an owner (Person).
*/
public class Goods {
public Goods() {
}
/**
* Represents a Credit taken by a Person, provided by a Bank.
*/
public class Credit {
public Credit() {
}
public void approve() {
// Approval logic
}
public Person() {
}
public Account() {
}
public void create() {
// Creation logic
}
/**
* Represents a Bank providing Credits and Accounts.
*/
public class Bank {
public Bank() {
}
About:
StarUML can also create a class diagram from existing Java code. This is called "reverse
engineering". When you want to generate a chart from existing code, or you modify the code
generated by SU, and want to reflect it in the chart. The reverse engineering feature is very
useful. The process of repeating work through a text editor such as a chart or DrJava is called
"round-trip engineering". This is also a basic process in object-oriented Code/Method:
Go to the main menu bar and select “Tools/Java/Reverse Engineer...” to reverse the existing
code. Select the directory where the Java code is located and click the "Add" or "Add All"
button to include them in the reverse engineering process, then click "Next". Select the module
you want to add the class to, which may be "Model1" and then "Next". In the Option Setup:
Confirm that "public", "package", "protected" and "private" are selected (this is the default
setting). Similarly, by default, the radio button "Create the field to the Attribute" is also selected.
Don't check the "Create Overview Diagram" box unless you want SU to create something else,
such as a chart with a bad layout that contains all the classes. When you have checked the
options, click on “Run”. SU will now import the classes in the selected files into your model.
Click "Finish" to exit the dialog when it is complete. Su now import the class, in the selected
file to the product model you need, click "Finish" When you exit the dialog, it is complete.
Output:
EXPERIMENT NO. - 11
AIM: Draw a Deployment Diagram.
Procedure:
Deployment Diagram is a type of diagram that specifies the physical hardware on which the
software system will execute. It also determines how the software is deployed on the underlying
hardware. It maps software pieces of a system to the device that are going to execute it.
The deployment diagram maps the software architecture created in design to the physical
system architecture that executes it. In distributed systems, it models the distribution of the
software across the physical nodes.
The software systems are manifested using various artifacts, and then they are mapped to the
execution environment that is going to execute the software such as nodes. Many nodes are
involved in the deployment diagram; hence, the relation between them is represented using
communication paths.
Descriptor form
1. A node
2. A component
3. An artifact
4. An interface
The steps below outline the major steps to take in creating a UML Deployment Diagram.
4. Add other elements to the diagram, such as components or active objects, if required