20CS2050L Software Engineering Labmanuel

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 47

Division of Computer Science and Engineering

School of Computer Science and Technology

Lab Manual

20CS2050 – Software Engineering Lab


(0:0:2)
Division of Computer Science and Engineering
School of Computer Science and Technology

Lab Manual

20CS2050 – Software Engineering Lab


(0:0:2)

Prepared by Verified by Approved by

Dr. T. Jemima Jebaseeli Mrs. P. Santhiya Dr.J Immanuel Johnraja

2
INDEX

1 Vision & Mission Statements …4

1 PEO, PO & PSO - B.Tech. Computer Science and Engineering …5

2 PEO, PO & PSO - B.Tech. Artificial Intelligence and Data …7


Science

3 PEO, PO & PSO - B.Tech. Computer Engineering …9

4 PEO, PO & PSO - B.Tech. Computer Science and Engineering … 11


(Artificial Intelligence)

5 PEO, PO & PSO - B.Tech. Computer Science and Engineering … 13


(Artificial Intelligence and Machine Learning)

6 Syllabus … 15

7 List of Exercises … 16

3
VISION

To raise world class Computer Science and Engineering professionals


excelling in academics, research and providing solutions to human
problems.

MISSION

 To develop professionals with strong fundamental concepts,


programming and problem-solving skills with an exposure to
emerging technologies.
 To promote research in the state of art technologies, providing
solutions to human problems especially in the areas of Health,
Water, Energy and Food.
 To develop leadership qualities with ethical values to serve the
society.

4
PEO, PO & PSO - B.Tech. Computer Science and Engineering

Programme Educational Objectives


Graduates will

1. demonstrate the knowledge acquired to design and develop innovative


software solutions.
2. Exhibit technical skills and excel as computer professionals,
academicians, researchers and entrepreneurs.
3. Execute professional practice to serve the society with ethics.

Programme Outcomes
Graduates will have the ability to

1. Engineering Knowledge: Apply the knowledge of mathematics,


natural sciences, engineering fundamentals specialization to the
solution of complex engineering problems.
2. Problem Analysis: Identify, formulate, review research literature and
analyze complex Engineering Problems reaching substantiated
conclusions using first principles of mathematics, natural sciences
and engineering sciences.
3. Design / Development of Solutions: Design solutions for complex
engineering problems and design system components or processes
that meet specific needs with appropriate consideration for the public
health and safety and the cultural, societal and environmental
considerations.
4. Conduct Investigations of Complex Problems: Use research- based
knowledge and research methods including design of experiments,
analysis and interpretation of data and synthesis of the information to
provide valid conclusions.
5. Modern Tool Usage: Create, Select and Apply appropriate techniques,
resources and modern engineering and IT tools including prediction
and modelling to complex engineering activities with an
understanding of the limitations.
6. The Engineer and Society: Apply Reasoning informed by the
contextual knowledge to assess societal, health, safety, legal and
cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and Sustainability: Understand the impact of the
professional engineering solutions in societal and environmental
contexts and demonstrate the knowledge of and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.

5
9. Individual and Team Work: Function effectively as an individual and
as a member or leader in diverse teams and in multi-disciplinary
settings.
10. Communication: Communicate effectively on complex engineering
activities with the engineering community and with society at large
such as being able to comprehend and write effective reports and
design documentation make effective presentations and give and
receive clear instructions.
11. Project Management and Finance: Demonstrate knowledge and
understanding of the engineering and management principles and
apply this to one’s own work, as a member and leader in a team, to
manage projects and in multi-disciplinary environments.
12. Life – Long Learning: Recognize the need for and have the
preparation and ability to engage in independent and lifelong leaning
in the broadest context of technological change.

Program Specific Outcomes (PSOs)

Graduates will have the ability to


1. Understand, analyse and develop software products and solutions
using standard practices and strategies in the areas related to
algorithms, system software, multimedia, web design, database, and
networking for effective and efficient design of computer-based
systems of varying complexity.
2. Employ modern computer languages, environments, and platforms in
creating innovative career paths to be an entrepreneur, and a zest for
higher studies.

6
PEO, PO & PSO - B.Tech. Artificial Intelligence and Data Science

Program Educational Objectives (PEOs)


Graduates will

1. demonstrate the knowledge acquired in artificial intelligence and data


science, to analyse and identify the requirements, formulate and
develop innovative intelligent solutions.
2. Apply artificial intelligence and data science proficiency as
professionals, academicians and entrepreneurs to solve human
problems.
3. practise ethical and moral values and serve the humanity with social
concern.

Program Outcomes (POs)

1. Engineering Knowledge: Apply the knowledge of mathematics,


natural sciences, engineering fundamentals specialization to the
solution of complex engineering problems.
2. Problem Analysis: Identify, formulate, review research literature and
analyze complex Engineering Problems reaching substantiated
conclusions using first principles of mathematics, natural sciences
and engineering sciences.
3. Design / Development of Solutions: Design solutions for complex
engineering problems and design system components or processes
that meet specific needs with appropriate consideration for the public
health and safety and the cultural, societal and environmental
considerations.
4. Conduct Investigations of Complex Problems: Use research- based
knowledge and research methods including design of experiments,
analysis and interpretation of data and synthesis of the information to
provide valid conclusions.
5. Modern Tool Usage: Create, Select and Apply appropriate techniques,
resources and modern engineering and IT tools including prediction
and modelling to complex engineering activities with an
understanding of the limitations.
6. The Engineer and Society: Apply Reasoning informed by the
contextual knowledge to assess societal, health, safety, legal and
cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and Sustainability: Understand the impact of the
professional engineering solutions in societal and environmental
contexts and demonstrate the knowledge of and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.
7
9. Individual and Team Work: Function effectively as an individual and
as a member or leader in diverse teams and in multi-disciplinary
settings.
10. Communication: Communicate effectively on complex engineering
activities with the engineering community and with society at large
such as being able to comprehend and write effective reports and
design documentation make effective presentations and give and
receive clear instructions.
11. Project Management and Finance: Demonstrate knowledge and
understanding of the engineering and management principles and
apply this to one’s own work, as a member and leader in a team, to
manage projects and in multi-disciplinary environments.
12. Life – Long Learning: Recognize the need for and have the
preparation and ability to engage in independent and lifelong leaning
in the broadest context of technological change.

Program Specific Outcome (PSOs)


Graduates will have ability to

1. understand, analyse, design and develop intelligent systems of varying


complexity using statistical and computational principles in the areas
of algorithms, artificial intelligence, data science, robotics, multimedia
and distributed systems
2. apply contemporary tools and techniques of artificial intelligence and
data science in exhibiting skills for employability, entrepreneurship
and research.

8
B.Tech. Computer Engineering

Program Educational Objectives (PEOs)


Graduates will

1. demonstrate the knowledge attained, to analyse the technical


requirements, and develop secure innovative solutions.
2. provide solutions for real world problems through the assimilated
expertise as technical professionals, academicians and entrepreneurs
3. contribute to the humanity by exercising the code of ethics and
professional practice.

Program Outcomes (POs)

1. Engineering Knowledge: Apply the knowledge of mathematics,


natural sciences, engineering fundamentals specialization to the
solution of complex engineering problems.
2. Problem Analysis: Identify, formulate, review research literature and
analyze complex Engineering Problems reaching substantiated
conclusions using first principles of mathematics, natural sciences
and engineering sciences.
3. Design / Development of Solutions: Design solutions for complex
engineering problems and design system components or processes
that meet specific needs with appropriate consideration for the public
health and safety and the cultural, societal and environmental
considerations.
4. Conduct Investigations of Complex Problems: Use research- based
knowledge and research methods including design of experiments,
analysis and interpretation of data and synthesis of the information to
provide valid conclusions.
5. Modern Tool Usage: Create, Select and Apply appropriate techniques,
resources and modern engineering and IT tools including prediction
and modelling to complex engineering activities with an
understanding of the limitations.
6. The Engineer and Society: Apply Reasoning informed by the
contextual knowledge to assess societal, health, safety, legal and
cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and Sustainability: Understand the impact of the
professional engineering solutions in societal and environmental
contexts and demonstrate the knowledge of and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.
9. Individual and Team Work: Function effectively as an individual and
as a member or leader in diverse teams and in multi-disciplinary
settings.

9
10. Communication: Communicate effectively on complex engineering
activities with the engineering community and with society at large
such as being able to comprehend and write effective reports and
design documentation make effective presentations and give and
receive clear instructions.
11. Project Management and Finance: Demonstrate knowledge and
understanding of the engineering and management principles and
apply this to one’s own work, as a member and leader in a team, to
manage projects and in multi-disciplinary environments.
12. Life – Long Learning: Recognize the need for and have the
preparation and ability to engage in independent and lifelong leaning
in the broadest context of technological change.

Program Specific Outcome (PSOs)


Graduates will have ability to

1. understand, analyse and develop products and software solutions


using standard practices and strategies in the areas of algorithms,
communication networks, real time systems, system administration,
robotics, virtual reality, artificial intelligence, data science and cyber
security.
2. employ modern programming languages and platforms in the field of
computing to develop skills for employability, entrepreneurship, and
research.

10
B.Tech. Computer Science and Engineering (Artificial Intelligence)

Program Educational Objectives (PEOs)


Graduates will

1. demonstrate the technical knowledge attained, to investigate and


identify the requirements, and develop intelligent solutions.
2. exhibit proficiency as artificial intelligence professionals, academicians
and entrepreneurs to develop solutions for real world problems.
3. serve the society by adopting ethical and moral values.

Program Outcomes (POs)

1. Engineering Knowledge: Apply the knowledge of mathematics,


natural sciences, engineering fundamentals specialization to the
solution of complex engineering problems.
2. Problem Analysis: Identify, formulate, review research literature and
analyze complex Engineering Problems reaching substantiated
conclusions using first principles of mathematics, natural sciences
and engineering sciences.
3. Design / Development of Solutions: Design solutions for complex
engineering problems and design system components or processes
that meet specific needs with appropriate consideration for the public
health and safety and the cultural, societal and environmental
considerations.
4. Conduct Investigations of Complex Problems: Use research- based
knowledge and research methods including design of experiments,
analysis and interpretation of data and synthesis of the information to
provide valid conclusions.
5. Modern Tool Usage: Create, Select and Apply appropriate techniques,
resources and modern engineering and IT tools including prediction
and modelling to complex engineering activities with an
understanding of the limitations.
6. The Engineer and Society: Apply Reasoning informed by the
contextual knowledge to assess societal, health, safety, legal and
cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and Sustainability: Understand the impact of the
professional engineering solutions in societal and environmental
contexts and demonstrate the knowledge of and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.
9. Individual and Team Work: Function effectively as an individual and
as a member or leader in diverse teams and in multi-disciplinary
settings.

11
10. Communication: Communicate effectively on complex engineering
activities with the engineering community and with society at large
such as being able to comprehend and write effective reports and
design documentation make effective presentations and give and
receive clear instructions.
11. Project Management and Finance: Demonstrate knowledge and
understanding of the engineering and management principles and
apply this to one’s own work, as a member and leader in a team, to
manage projects and in multi-disciplinary environments.
12. Life – Long Learning: Recognize the need for and have the
preparation and ability to engage in independent and lifelong leaning
in the broadest context of technological change.

Program Specific Outcome (PSOs)


Graduates will have ability to

1. understand, analyse and develop innovative solutions using the


principles of artificial intelligence, algorithms, web technology, data
science, networking, and software engineering.
2. use artificial intelligence tools and languages to exhibit skills in
employability, entrepreneurship and research.

12
B.Tech. Computer Science and Engineering (Artificial Intelligence and
Machine Learning)

Program Educational Objectives (PEOs)


Graduates will

1. demonstrate the technical knowledge acquired, to analyse the


requirements, identify the technical specifications, design and develop
intelligent solutions.
2. exhibit the expertise as artificial intelligence and machine learning
professionals, academicians and entrepreneurs.
3. serve the society with social concern by adopting code of ethics and
professional practice.

Program Outcomes (POs)

1. Engineering Knowledge: Apply the knowledge of mathematics,


natural sciences, engineering fundamentals specialization to the
solution of complex engineering problems.
2. Problem Analysis: Identify, formulate, review research literature and
analyze complex Engineering Problems reaching substantiated
conclusions using first principles of mathematics, natural sciences
and engineering sciences.
3. Design / Development of Solutions: Design solutions for complex
engineering problems and design system components or processes
that meet specific needs with appropriate consideration for the public
health and safety and the cultural, societal and environmental
considerations.
4. Conduct Investigations of Complex Problems: Use research- based
knowledge and research methods including design of experiments,
analysis and interpretation of data and synthesis of the information to
provide valid conclusions.
5. Modern Tool Usage: Create, Select and Apply appropriate techniques,
resources and modern engineering and IT tools including prediction
and modelling to complex engineering activities with an
understanding of the limitations.
6. The Engineer and Society: Apply Reasoning informed by the
contextual knowledge to assess societal, health, safety, legal and
cultural issues and the consequent responsibilities relevant to the
professional engineering practice.
7. Environment and Sustainability: Understand the impact of the
professional engineering solutions in societal and environmental
contexts and demonstrate the knowledge of and need for sustainable
development.
8. Ethics: Apply ethical principles and commit to professional ethics and
responsibilities and norms of the engineering practice.

13
9. Individual and Team Work: Function effectively as an individual and
as a member or leader in diverse teams and in multi-disciplinary
settings.
10. Communication: Communicate effectively on complex engineering
activities with the engineering community and with society at large
such as being able to comprehend and write effective reports and
design documentation make effective presentations and give and
receive clear instructions.
11. Project Management and Finance: Demonstrate knowledge and
understanding of the engineering and management principles and
apply this to one’s own work, as a member and leader in a team, to
manage projects and in multi-disciplinary environments.
12. Life – Long Learning: Recognize the need for and have the
preparation and ability to engage in independent and lifelong leaning
in the broadest context of technological change.

Program Specific Outcome (PSOs)


Graduates will have ability to

1. understand, analyse and develop innovative solutions using the


principles of artificial intelligence, machine learning, data science,
algorithms, web technologies and communication networks.
2. apply artificial intelligence and machine learning tools and languages
to exhibit skills in employability, entrepreneurship and research.

14
20CS2050L Software Engineering

Syllabus

Course Objectives

Enable the student to


1. identify and apply appropriate software life cycle model to design the high-level system.
2. design the structure and behavior of the software system using UML diagrams.
3. apply software testing and quality assurance techniques at the module level to ensure good
quality software.

Course Outcomes

The student will be able to


1. discover an effective software engineering process to develop software-intensive systems.
2. translate the requirements specification into an implementable design.
3. construct UML diagrams along with design strategies and design patterns.
4. analyze architectural design methods.
5. evaluate the system using various testing strategies.
6. develop the software system with quality measures

List of Exercises

1. Problem Analysis and Project Planning -Thorough study of the problem - Identify Project
scope, Objectives and Infrastructure.
2. Software Requirement Analysis - Describe the individual Phases/modules of the project
and Identify deliverables. Identify functional and non-functional requirements.
3. Data Modeling - Use work products - data dictionary. Software Designing - Develop use
case diagrams and activity diagrams, build and test class diagrams, sequence diagrams and
add interface to class diagrams.
4. Estimation of project size using Function Point(FP) for calculation.
5. Design Test Script/Test Plan(both Black box and White Box approach
6. Prototype model - Develop the prototype of the product.

Applications

● Course management system (CMS)


● Easy Leave
● E-Bidding
● Electronic Cash counter
● Chatbot preparation

15
LIST OF EXERCISE

# NAME OF THE EXPERIMENT PAGE NO.

Problem analysis and project planning -thorough study of the


1 17
problem - identify project scope, objectives and infrastructure.
Software Requirement Analysis - Describe the individual
2 Phases/modules of the project and Identify deliverables. Identify 20
functional and non-functional requirements

3 Develop use case diagram 23

4 Build and test class diagram 26

5 Software design using sequence diagram 30

6 Software design using activity diagram 33

7 Component diagram and deployment diagram 37

8 Estimation of project size using Function Point(FP) calculation 40

Design test script and test plan using both black box and white box
9 43
approaches

10 Software Requirments Specification - Develop the product prototype 47

16
Experiment No: 1

Problem analysis and project planning -thorough study of the problem - identify project
scope, objectives and infrastructure.

PROBLEM ANALYSIS AND PROJECT PLANNING

The problem statement is the initial starting point for a project. It is basically a one to three
page statement that everyone on the project agrees with that describes what will be done at a
high level. The problem statement is intended for a broad audience and should be written in
nontechnical terms. It helps the non-technical and technical personnel communicate by
providing a description of a problem. It doesn't describe the solution to the problem. The
input to requirement engineering is the problem statement prepared by customer. It may give
an overview of the existing system along with broad expectations from the new system.

The first phase of requirements engineering begins with requirements elicitation i.e. gathering
of information about requirements. Here, requirements are identified with the help of
customer and existing system processes. So from here begins the preparation of problem
statement. So, basically a problem statement describes what needs to be done without
describing how.

IDENTIFY THE SOFTWARE PROJECT

A project is well-defined task, which is a collection of several operations done in order to


achieve a goal
 Every project may has a unique and distinct goal.
 Project comes with a start time and end time.
 Project ends when its goal is achieved hence it is a temporary phase in the lifetime of
an organization.
 Project needs adequate resources in terms of time, manpower, finance, material and
knowledge
Software project management is essential to incorporate user requirements along with budget
and time constraints.

CREATE BUSINESS CASE

Business case

The Business Case is a reference point before, during, and after a project.

 Creating the Business Case draws the discussion from “What do we want to
build?” to “Why do we want to build it? ” This provides the justification for
starting the project.
17
 A written and agreed Business Case makes expectations explicit
 As the project progresses, the Business Case becomes the “guiding light”—the beacon
toward which everyone knows the project is directed.
 With a clear Business Case the project's stakeholders can monitor both the project and
the project's environment

BUSINESS CASE TEMPLATE

PROJECT

In bullet points, describe the problem this project aims to solve or the opportunity it aims to
develop.

HISTORY

In bullet points, describe the current situation.

LIMITATIONS

List what could prevent the success of the project, such as the need for expensive equipment,
bad weather, lack of special training, etc.

APPROACH

List what is needed to complete the project.

BENEFITS

In bullet points, list the benefits that this project will bring to the organization.

ARRIVE AT A PROBLEM STATEMENT

 Project Problem Statement


 Section 1. Project Description
 Section 2. Problem Constraints
 Section 3. Schedule, Resource, and Budget Constraints
Section 1. Project Description:
Describe about your project in full scope.
Section 2. Problem Constraints
 What is the Purpose and Need for the work?
 What questions need to be answered?
 What key issues should be considered?
 What are the Goals and Objectives of the work?
18
 Who is the audience?
 What types of useable information and tools are available and practical?
Section 3. Schedule, Resource, and Budget Constraints
 What are the Existing Resources? Are they internal or external?
 What is the Feasible Budget?
 What are the time constraints that may dictate delivery of work items?
 What is the availability and quality of existing data?

19
Experiment No:2
Software Requirement Analysis - Describe the individual Phases/modules of the project and
Identify deliverables. Identify functional and non-functional requirements

SOFTWARE REQUIREMENTS ANALYSIS

Requirements Analysis is perhaps the most difficult, most error-prone and most
communication intensive software development. It can be successful only through an
effective customer-developer partnership. It is needed to know what the users really need.
There are a number of requirements elicitation methods. Few of them are listed below.
1. Interviews
2. Brainstorming Sessions
3. Facilitated Application Specification Technique (FAST)
4. Quality Function Deployment (QFD)
5. Use Case Approach
The success of an elicitation technique used depends on the maturity of the analyst,
developers, users and the customer involved.

FEASIBILITY STUDY

The outline for the nine parts of a feasibility report as follows:

1. Executive summary
2. Description of product/service
3. Technology considerations
4. Product/service marketplace
5. Marketing strategy
6. Organization/staffing
7. Schedule
8. Financial projections
9. Findings and recommendations

FUNCTIONAL REQUIREMENTS

In software engineering, a functional requirement defines a system or its component. It


describes the functions a software must perform. A function is nothing but inputs, its
behavior, and outputs. It can be a calculation, data manipulation, business process, user
interaction, or any other specific functionality which defines what function a system is likely
to perform.

20
Functional software requirements help you to capture the intended behavior of the system.
This behavior may be expressed as functions, services or tasks or which system is required to
perform.
 Services the system should provide
 What the system should do or not in reaction to particular situations
 Example: “If a patient is known to be allergic to a particular medication, then
prescription of that medication shall result in a warning message being issued to the
prescriber”

Some of the more typical functional requirements include:


 Business Rules
 Transaction corrections, adjustments and cancellations
 Administrative functions
 Authentication
 Authorization levels
 Audit Tracking
 External Interfaces
 Certification Requirements
 Reporting Requirements
 Historical Data
 Legal or Regulatory Requirements

NON-FUNCTIONAL REQUIREMENTS

A non-functional requirement defines the quality attribute of a software system. They


represent a set of standards used to judge the specific operation of a system. Example, how
fast does the website load?
A non-functional requirement is essential to ensure the usability and effectiveness of the
entire software system. Failing to meet non-functional requirements can result in systems that
fail to satisfy user need.
 Constraints on the services or functions offered by the system
 Example: “The system shall be available to all clinics during normal working hours
(Mon-Fri, 0830-1730). Downtime during normal working hours shall not exceed 5
seconds in any one day”

Some typical non-functional requirements are:


 Performance – for example Response Time, Throughput, Utilization, Static
Volumetric
 Scalability
 Capacity
 Availability
 Reliability
21
 Recoverability
 Maintainability
 Serviceability
 Security
 Regulatory
 Manageability
 Environmental
 Data Integrity
 Usability
 Interoperability

SYSTEM REQUIREMENTS

 A structured document setting out detailed descriptions of the system’s functions,


services and operational constraints.
 Defines what should be implemented so may be part of a contract between client and
contractor.

22
Experiment No: 3
Develop use case diagram

OBJECTIVE
Use case diagrams identify the functionality provided by the system (use cases), the users
who interact with the system (actors), and the association between the users and the
functionality. Use cases are used in the Analysis phase of software development to articulate
the high level requirements of the system. The primary goals of Use case diagrams include:

 Providing a high-level view of what the system does.


 Identifying the users (actors) of the system.
 Determining areas needing human-computer interfaces.
Use cases extend beyond pictorial diagrams. In fact, text-based use case descriptions are
often used to supplement diagrams, and explore use case functionality in detail.

TOOLS DESCRIPTION
The basic components of Use case diagrams are the Actor, the Use case and the Association.
Actor
An Actor, as mentioned, is a user of the system, and is depicted using a stick figure. The role
of the user is written beneath the icon. Actors are not limited to users. If a system
communicates with another application and expects input or delivers output then that
application can also be considered an actor.

Use Case
A Use Case is functionality provided by the system, typically described as verb + object (eg:
Register Car, Delete User). Use cases are depicted with an ellipse. The name of the use case
is written within the ellipse.

23
Association
Associations are used to link Actors with Use cases, and indicate that an Actor participates in
the Use case in some form. A line connecting the Actor and Use case depicts associations.

The following image shows how these three basic elements work together to form a use case
diagram.

ALGORITHM

Step 1: Define the actors like member, circulation clerk and supplier for the Library
Information System.

Step 2: Determine the events that are necessary for developing a system.

Step 3: Represent the communication relationship of an actor in the system by connecting the
actor symbol to the Use-Case symbol with a solid path.

Step 4: Represent the ‘Uses’ and ‘Extends’ relationship if required.

Step 5: Use the necessary tools for developing the Library Information System.

24
SAMPLE OUTPUT

<<USES>>

Borrow Books Check Library Loan


<<USES>>

<<EXTENDS>>

<<USES>>
MEMBER
Interlibrary Loan

Circulation Clerk

Return Books

Do Research

Read Books

Supplier

Purchase Supply

25
Experiment No:4
Build and test class diagram

OBJECTIVE
Class diagrams identify the class structure of a system, including the properties and methods
of each class. It specifies the various relationships that can exist between classes, such as an
inheritance. The Class diagram is one of the most widely used diagrams from the UML
specification. Part of the popularity of Class diagrams is the fact that many CASE tools, such
as Rationale Rose, will provide clarity of the designing process.

TOOLS DESCRIPTION
The basic components on a Class diagram are classes and the relationships between them.

Class
A class is depicted using a rectangle divided into 3 sections. The top section is the name of
the class. The middle section defines the properties of the class. The bottom section lists the
methods of the class.

Association
An Association is a generic relationship between two classes, and is modeled by a line
connecting the two classes. This line can be qualified with the type of relationship, and can
26
also feature multiplicity rules (for eg. One-to-one, one-to-many, many-to-many) for the
relationship.

Composition
If a class cannot exist by itself, and instead must be a member of another class, then that class
has a Composition relationship with the containing class. A composition relationship is
indicated by a line with a filled diamond.

Dependency
A Dependency relationship is indicated by a dotted arrow.

Aggregation
Aggregations indicate a whole-part relationship and are known as “has-a” relationships. An
Aggregation relationship is indicated by a line with a hollow diamond.

Generalization
A Generalization relationship is the equivalent of an inheritance relationship in object-
oriented terms. (“is-a” relationship). A Generalization relationship is indicated by an arrow
with a hollow arrow head pointing to the base or “parent” class.

Association
Object diagrams can contain associations as well. Often, the constraints, relationship details
and multiplicity rules found in the Class diagram are left out to concentrate the diagram on

27
the objects and their properties. Associations between objects are simply diagrammed using a
line joining the two objects

Tool Box for class diagram

ALGORITHM

Step 1: Identify the various classes that behave as main to perform various functions in the
system.

Step 2: Define all its attributes and what operations they perform.

Step 3: Identify the various relationships among the classes.

Step 4: The relationship between a class and its subclass is represented by generalization.

Step 5: Design the class diagram for the Library Information System using the tools provided.

28
SAMPLE OUTPUT

Library

Member
CirculationClerk
MemberId : integer
name : string Staff Name : string
dept : string returnstatus : string
status : string
bookname : string borrowBooks()
bookid : int returnBooks()
interlibraryLoan()
borrowBooks()
returnBooks()
interlibraryLoan()
readBooks()

Supplier
Bookname : string OrderDetails
author : string order_no : integer
No of copies : integer order_dt : date
supplydate : date order_qty : integer
supplier id : integer supplier id : integer
supplier name : string
supplier address : string purchase Books()
received qty()
supplybooks()

29
Experiment No:5
Software design using sequence diagram

OBJECTIVE

Sequence diagrams demonstrate the behavior of objects in a use case by describing the
objects and the messages they pass. The diagrams are read left to right and descending. The
example below shows an object of class 1 start the behavior by sending a message to an
object of class 2. Messages pass between the different objects until the object of class 1
receives the final message.

TOOLS DESCRIPTION
In a Sequence diagram, classes and actors are listed as columns with vertical lifelines
indicating the lifetime of the object over time.

Object
Objects are instances of classes, and are arranged horizontally. The pictorial representation
for an object is a class (a rectangle) with the name prefixed by the object name (optional) and
a semi-colon.

Actor
Actors can also communicate with objects, so they too can be listed as a column. An Actor is
modeled using the ubiquitous symbol, the stick figure.

30
Lifeline
The Lifeline identifies the existence of the object over time. The notation for a Lifeline is a
vertical dotted line extending from an object.

Activation

Activations, modeled as rectangular boxes on the lifeline, indicate when the object is
performing an action.

Message
Messages, modeled as horizontal arrows between Activations, indicate the communications
between objects.

31
ALGORITHM

Step 1: Identify the objects in the diagram according to the system to be drawn.

Step 2: Identify the sequence of transfer of messages between the objects.

Step 3: Determine how the messages are passed between two objects and how other objects
respond.

Step 4: Create the sequence diagram based on the information from step 1 and step 2 with the
tools provided.

SAMPLE OUTPUT

LIBRARY DAT ABAS REFEREN


MEMBER CLERK E CE
Read Books
Do Research Allow access to the Member
Allow Access to the member
Show Id

Scan Id
Check Id

Enter Book Id
Show Book Id
Scan book Id
Validate Book Id

Notify Return Date

Inform Return Date


Save Data

Check User Information

Enter User Id

Validate User Id

Show in Details

Check Book Info

Show Details of the book if exist

32
Experiment No: 6
Software design using activity diagram

OBJECTIVE
Activity diagrams are used to document workflows in a system, from the business level down
to the operational level. When looking at an Activity diagram, you’ll notice elements from
state diagrams. In fact, the Activity diagram is a variation of the state diagram where the
“states” represent operations, and the transitions represent the activities that happen when the
operation is complete. The general purpose of Activity diagrams is to focus on flows driven
by internal processing vs. external events.

TOOLS DESCRIPTION
Activity states
Activity states mark an action by an object. The notation for these states are rounded
rectangles, the same notation as found in Statechart diagrams.

Transition
When an Activity state is completed, processing moves to another Activity state. Transitions
are used to mark this movement. Transitions are modeled using arrows.

Swimlane

33
Swimlanes divide activities according to objects by arranging objects in column
format and placing activities by that object within that column. Objects are listed at the top of
the column, and vertical bars separate the columns to form the swimlanes.

Initial State
The Initial State marks the entry point and the Initial Activity State. The notation for the
Initial State is the same as in Statechart diagrams, a solid circle. There can only be one Initial
State on a diagram.

Final State
Final States mark the end of the modeled workflow. There can be multiple Final States on a
diagram, and these states are modeled using a solid circle surrounded by another circle.

Synchronization Bar
Activities often can be done in parallel. To split processing (“fork”), or to resume processing
when multiple activities have been completed (“join”), Synchronization Bars are used. These
are modeled as solid rectangles, with multiple transitions going in and/or out

34
ALGORITHM

Step 1: Identify the operations and transformations that are triggered by the completion of an
operation, which is referred as activities.

Step 2: Represent those activities by a rounded rectangle.

Step 3: Link the activities by automatic transactions, represented by arrows.

Step 4: If needed a decision which is represented by a diamond with many transitions coming
out of it.

Step 5: Design the Activity diagram using the information obtained from the above steps
using the tools provided.

SAMPLE OUTPUT

VERIFY ID

INVALID ID

VALID ID

DO
ACTIVITIES

RETURN BORROW DO READ


BOOKS BOOKS RESEARCH BOOKS

INTERLIBRARY
LOAN

TAKE
BOOKS

35
Experiment No: 7

Component diagram and deployment diagram

COMPONENT DIAGRAM

OBJECTIVE

Component diagrams fall under the category of an implementation diagram, a kind of


diagram that models the implementation and deployment of the system. A Component
diagram in particular, is used to describe the dependencies between various software
components such as the dependency between executable files and source files.

TOOLS DESCRIPTION

Component
A component represents a software entity in a system. Examples include source code files,
programs, documents and resource files. A component is represented using a rectangular box,
with two rectangles protruding from the left side

Dependency
A Dependency is used to model the relationship between two components. The notation for a
dependency relationship is a dotted arrow, pointing from a component to the component it
depends on.

36
ALGORITHM

Step 1: Identify the software entities used in the system.

Step 2: The Dependency relationship is drawn according to the system set up.

Step 3: The link is drawn between the components.

Step 4: Terminate the process after completion.

SAMPLE OUTPUT

Library DB Updated Info


(Source) (Source)

Library Components.dll
(Assembly)

DEPLOYMENT DIAGRAM

OBJECTIVE

Deployment diagrams are another model in the implementation diagram category. The
Deployment diagram models the hardware used in implementing a system and the association
between those hardware components. Components can also be shown on a Deployment
diagram to show the location of their deployment. Deployment diagrams can also be used
early on in the design phase to document the physical architecture of a system.

TOOLS DESCRIPTION

Component
A Component represents a software entity in a system. Examples include source code files,
programs, documents, and resource files. On a deployment diagram, components are placed

37
within nodes to identify their deployed location. A component is represented using a
rectangular box, with two rectangles protruding from the left.

Node
A node represents a piece of hardware in the system. This entity is represented by a three-
dimensional cube.

Association
An association, drawn as a solid line between two nodes, indicates a line of
communication between the hardware elements.

ALGORITHM

Step 1: Identify the Processors and devices used in the Deployment Diagram.

Step 2: The processors are connected according to the office set up.

Step 3: The association link is drawn with the messages.

Step 4: Terminate the process after completion.

38
SAMPLE OUTPUT

Database
Server

Application
Printer
Server

Client 2
Client 1

39
Experiment No: 8

Estimation of project size using Function Point(FP) calculation

OBJECTIVE
Estimation Of Project Size Using Function Point(Fp) For Calculation

METHODOLOGY
Here we have the following scenarios:
1. Much relevant project data are available for the current project but not much information
about previous projects.
2. Previous project data are available for the project but not much information about the
current project.
3. Project data are available for the current project as well as that of previous projects.
4. Some project data are available for the current project.
5. No project data are available for both current as well as previous projects.

FUNCTION POINT ANALYSIS | COCOMO MODEL:


Calculation of effort for the project using function point analysis calculation method

40
COCOMO MODEL

Calculation of effort for the project using COCOMO model calculation method.

41
BASIC COCOMO MODEL

42
Experiment No:9
Design test script and test plan using both black box and white box approaches

OBJECTIVE

The objective of the experiment is to perform automation testing on a web page using
selenium framework on different browsers using Java.

DESCRIPTION

A webpage is to be exhaustively tested using different browsers using selenium framework.


A webpage with multiple form fields (Text box, radio button, drop down buttons, buttons,
hyperlink) is created and uploaded in to a webserver (IIS/Apache). The content and the form
fields in the webpage is individually checked. Also, the client-side validation performed
using JavaScript is also to be evaluated. The evaluation is to be carried out by developing
various test cases for every individual web component. To this end, an extensive software
testing framework is required. Selenium is a free opensource automating and testing
framework that supports C#, Java, Perl, PHP, Python and Ruby. Selenium Webdriver
provides the functionality of conducting various testcases.

PROCEDURE

Server side

Load the designed Webpage to be tested in the server. (IIS Server- C:\inetpub\wwwroot)
(Apache Server.............................................................)

Client side

 Download all the necessary selenium packages based on the host machine requirement
(windows/mac/linux, x86/x64)
 Download the corresponding browser’s (Chrome/opera/firefox) web driver to integrate
the IDE & browser.
 Using the IDE (Eclipse/Jupyter) create a new Java/Python program.
 Import all the required selenium packages in the java program.

43
 Using setProperty(), provide the name and location of the browser’s webdriver.
 And a WebDriver class instances of the browser is created and it is used to access the
webpage.
 The method navigate().to(“URL”) launches the website in the test browser.
 Every component in a webpage is accessed by the method findElement() and specific
entities using the following
 findElement(By.id("identifier value"))
 findElement(By.name("name"))nd
 findElement(By.linkText(“Link text”))
 findElement(By.className(“class name”))
 Values are passed on using the method sendKeys(“value”).
 Inner HTML values are obtained using the method getText().
 Values from forms are obtained using the method getAttribute("value").
 Browser events such as click, clear, back, forward, refresh, and close are performed
using the methods click(), clear(), back(), forward(), refresh(), quit() respectively.
 Also, moving between windows and frames are performed using the methods
switchTo().window("windowName") and switchTo().frame("frameName");
 Javascript method is invoked by the method executeScript() of the class
JavascriptExecuter

SOURCE CODE (Chrome)


//Selenium packages

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
// Chrome packages
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import com.sun.org.apache.bcel.internal.generic.Select;

public class chrome {


public static void main(String args[])
{

// System.out.print("hi");

System.setProperty("webdriver.chrome.driver", "C:\\Users\\Titus\\Documents\\
KITS\\2021-22\\01 odd sem\\20CS2050 L-Software Engineering Lab-2021-1-BIV\\09 Ex\\
chromedriver.exe");
// WebDriver driver=new ChromeDriver();
ChromeOptions opt = new ChromeOptions();
opt.addArguments("disable-extensions");
44
opt.addArguments("--start-maximized");
WebDriver driver = new ChromeDriver(opt);

// Launch website
driver.navigate().to("http://localhost/test.html");

//Test case 1
System.out.print("\n\n Test Case 1: Content checking");
String o1 = driver.findElement(By.id("HText")).getText();
System.out.print("\n Test Outcome:"+o1);
System.out.print("\n Desired Outcome:"+"Online Banking solution");

if (o1.equals("Online Banking solution"))


{
System.out.print("\n Summary Test case 1 status: Success ");
}else
{
System.out.print("\n Summary Test case 1 status: Fail");
}
//Test case 2:

System.out.print("\n\n\n Test Case 2: Checking for null elements");


driver.findElement(By.id("fname")).sendKeys("");
System.out.print("\n Given input for textbox (Name):"+"");
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("tbox()");

String o2=driver.findElement(By.id("efname")).getAttribute("value");
System.out.print("\nTest Outcome:"+o2);
System.out.print("\n Desired Outcome:"+"Name field cant be empty");

if (o2.equals("Name field cant be empty"))


{
System.out.print("\n Summary: Test case 2 status: Success ");
}else
{
System.out.print("\n Summary: Test case 2 status: Fail ");
}

//Test case 3:
System.out.print("\n\n\n Test case 3");
driver.findElement(By.id("fname")).sendKeys("1234567890000");
System.out.print("\n Given input for textbox (Name):"+"1234567890000");
jse.executeScript("tbox()");
String o3=driver.findElement(By.id("efname")).getAttribute("value");

45
System.out.print("\n Test Outcome:"+o3);
System.out.print("\n Desired Outcome:"+"First name cannot be more than 10 chars");

if (o3.equals("First name cannot be more than 10 chars"))


{
System.out.print("\n Summary Test case 2 status: Success ");
}else
{
System.out.print("\n Summary Test case 2 status: Fail");
}

//Close the Browser


driver.close();
}
OUTPUT(Chrome):

46
Experiment No: 10
Software Requirments Specification - Develop the product prototype

OBJECTIVE

The objective of the experiment is to generate a detailed SRS for the project.

SOFTWARE REQUIREMENTS SPECIFICATION DOCUMENT

A Software requirements specification document describes the intended purpose,


requirements and nature of a software to be developed. It also includes the yield and cost of
the software.

TABLE OF CONTENTS

1. Introduction

1.1 Purpose

1.2 Intended Audience

1.3 Intended Use

1.4 Product Scope

2. Overall Description

2.1 User Needs

2.2 Assumptions and Dependencies

3. System Features and Requirements

3.1 Functional Requirements

3.2 External Interface Requirements

3.3 System Features

3.4 Nonfunctional Requirements

47

You might also like