0% found this document useful (0 votes)
26 views12 pages

Sre Lab 02

The document discusses an introduction to the Unified Modeling Language (UML). It defines UML, lists its components, and describes common UML diagrams including class, object, use case, state, communication, sequence, activity, deployment, and others.

Uploaded by

Coca Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views12 pages

Sre Lab 02

The document discusses an introduction to the Unified Modeling Language (UML). It defines UML, lists its components, and describes common UML diagrams including class, object, use case, state, communication, sequence, activity, deployment, and others.

Uploaded by

Coca Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA

FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

SOFTWARE REQUIREMENT
ENGINEERING

Experiment 2
Introduction to Unified Modeling Language

CLO 1: Understanding the basics of requirements engineering, requirements


elicitation, techniques and elementary modeling techniques to develop
systems’ initial Design Model.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Purpose:

This experiment provides an introduction to Unified Modeling Language. Student will get

basic introduction of the diagrams available for sysrem modeling. Star UML modelling

tool will also be introduced in this lab.

Objectives:

At the end of this experiment you will

1. Learn what is unified modeling langiage ?

2. Characteristics of good user requirements.

3. Components of UML.

Equipment and Components:

1. StarUML v2.8.0
2. Microsoft Visio Professional 2013

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Software Requirement Specification Document:

Before developing a project the system has to be studied carefully. From the day one we
take notes and write everything regarding the system from scratch this is called SRS
Document. SRS includes the scope, purpose, authors, functional requirements, software,
tools, nonfunctional requirements etc.

Unified Modeling Language:

The Unified Modeling Language (UML) enables system developers to create blueprints
that capture their requirements in a standard, easy-to understand way, and provides a
mechanism to effectively share and communicate these requirements with others.
 It does this via a set of symbols and diagrams.
 Each diagram plays a different role within the development process.

Components of the UML

 The UML consists of a number of graphical elements that combine to form


diagrams.
 UML is a language; it has rules for combining these elements.
 The purpose of the diagrams is to present multiple views of a system; this set of
multiple views is called a model.
 A UML model tells what a system is supposed to do.

UML can be used with all processes, throughout the software development life cycle. UML
is not a methodology, it does not require any formal work products .Yet it does provide
several types of diagrams that increase the ease of understanding an application under
development.
The most useful, standard UML diagrams are:
 Class diagram
 Object diagram
 Use case diagram
 State-chart diagram
 Communication diagram
 Sequence diagram

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

 Activity diagram
 Component diagram
 Deployment diagram

Class Diagram:
 A class is a category or group of things that have the same attributes and the same
behaviors.
 A rectangle is the icon that represents the class.
 It’s divided into three areas. The uppermost area contains the name, the middle
area holds the attributes, and the lowest area holds the operations i.e Anything in
the class of washing machines has attributes such as brand name, model, serial
number, and capacity. Behaviors for things in this class include the operations
“accept clothes,” “accept detergent,” “turn on,” and “turn off.”
 In UML, a multiword classname has initial capital letters for all the words and
eliminates white space between each word (for example, WashingMachine).
 Attribute names and operation-names follow the same convention, but the first
letter of the first word isn’t capitalized (for example, acceptClothes ()).

Object Diagram:
An object is an instance of a class—a specific thing that has specific values of the class’s
attributes. The icon is a rectangle, just like the class icon, but the name is underlined. In
the icon on the left, the name of the specific instance is on the left side of a colon, and the
name of the class is on the right side of the colon. The name of the instance begins with a
lowercase letter. It’s also possible to have an anonymous object, as the icon on the right of
Software Requirement Engineering UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Figure shows. This just means that you don’t supply a specific name for the object,
although you do show the class it belongs to.

Use Case Diagram:


A use case is a description of a system’s behavior from a user’s standpoint. It’s a tried-
and-true technique for gathering system requirements from a user’s point of view. It only
summarizes some of the relationships between use cases, actors, and systems.
It does not show the order in which steps are performed to achieve the goals of each use
cas. The little stick figure that corresponds to the washing machine user is called an actor.
The ellipse represents the use case.
The actor :—the entity that initiates the use case—can be a person or another system.
Use cases: specify the expected behavior (what), and not the exact method of making it
happen (how).
The use case is inside a rectangle that represents the system, and the actor is outside the
rectangle.

State Diagram:
At any given time, an object is in a particular state. This transition from one state to the
next state is represented by state diagram.i.e A person can be a newborn, infant, child,
adolescent, teenager, or adult. An elevator is either moving or stationary. A washing
machine can be either in the soaking, washing, rinsing, spinning, or off state. The symbol
at the top of the figure represents the start state and the symbol at the bottom represents
the end state.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Communication Diagram:
Both the sequence diagram and the communication diagram show interactions among
objects. For this reason, the UML refers to them collectively as interaction diagrams.

Rather than represent time in the vertical dimension, this diagram shows the order of
messages by attaching a number to the message label.

Sequence Diagram:
Objects interact with one another, and these interactions occur over time. The UML
sequence diagram shows the time-based dynamics of the interaction.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Arrow represents a message that goes from one object to another. Time, in this diagram,
proceeds from top to bottom. So the first message is timeSoak (), which the timer sends
to itself. The second message is sendWater (), which the timer sends to the water pipe.
The final message, stopRotating (), goes from the timer to the drum.

Activity Diagram:
The activities that occur within a use case or within an object’s behavior typically occur in
a sequence is represented by the activity diagram.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Deployment Diagram:
The UML deployment diagram shows the physical architecture of a computer based
system. It can depict the computers, show their connections with one another, and show
the software that sits on each machine. Each computer is represented as a cube, with
interconnections between computers drawn as lines connecting the cubes.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Notes:
It often happens that one part of a diagram present an ambiguous explanation of why
it’s there or how to work with it. When that’s the case, the UML note is helpful. Think of
a note as the graphic equivalent of a yellow sticky. Its icon is a rectangle with a folded
corner. Inside the rectangle is explanatory text.

Composite Structure Diagram:


Each component class inside the whole is called the composite structure Diagram.i.e a
person consists of a mind and a body. It consists of lines and symbols that join the Person
class to the Mind class and to the Body class.

Timing Diagram:
Timing diagram is designed to show how long an object is in a state.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Interaction Overview Diagram:


If you replaced some of the activities with sequence diagrams or communication
diagrams (or a combination of the two), you’d have UML 2.0’s new interaction overview
diagram.

Object Orientation Concepts:


Object Orientation
Person
Attributes: height, weight, and age.
Each of us is unique because of the specific values that each of us has for those attributes.
We also perform these operations: eat, sleep, read, write, talk, go to work, and more.

If we were to create a system that deals with information on people—say, a system for a
human resources department—we would likely incorporate some of these attributes and
some of these operations in our software.

Washing Machine
Attributes: brandName, modelName, serialNumber, and capacity
Operations: acceptClothes(), acceptDetergent(), turnOn(), and turnOff()

Class:
In the world of object-orientation, a class is used for categorization.it is used to place all
same types of things under a single name. For example students together makes a class
because they have same education level, same subjects and they do same operation that is
takeclass() etc.

Software Requirement Engineering UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

A class is also a template for making objects sort of like a cookie cutter that you use to
stamp out cookies.

Object:
An object is an instance of a class (a category). You and I, for example, are instances of the
Person class. An object has structure. That is, it has attributes (properties) and behavior.
An object's behavior consists of the operations it carries out. You can create new objects
based on WashingMachine class. In a class students are objects of class. For example you
all are objects of 2k22-SE class.

What is StarUML?
StarUML™ is a software modeling platform that supports UML (Unified Modeling
Language).
Installation Steps: Run the setup.

Step 1:

Step 2

Step 3

Step 4

Step 5

Step 6

StarUML Environment

Task 1:
Software Requirement Engineering UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Patient, software department, mobile phone, school, bus, Rawalpindi express

a. Identify the classes and objects from the list given above.
b. Write at least 3 attributes and 2 operations of each class found in above list.
c. Name the possible class of objects you found in above list.

Task 2 :
Consider that a student is a class writes its operations and attributes.

Task 3 :
Consider that a bus is a class writes its operations and attributes.

Software Requirement Engineering UET Taxila

You might also like