Upload
er-sourabh-thakur
View
238
Download
0
Embed Size (px)
Citation preview
8/2/2019 Uml Final1
1/38
SHRI DADAJI INSTITUTE OF TECHNOLOGY AND SCIENCE
A
Practical On
Software Engineering
A dissertation submitted to the
Rajiv Gandhi Technical University,
Bhopal
In partial fulfillment of the
Degree of Engineering
In
Computer Science Engineering
2011-2012.
Submitted to: Submitted by:
Ankit Bakshi Sourabh Thakur (0823cs091077)
Head of Department
Miss. Shilpa Jaiswal
1
8/2/2019 Uml Final1
2/38
ABSTRACT
The Unified Modeling Language (UML) is a visua
language for modeling complex applications. Although most of today's applications hav
some sort of graphical user interface (GUI), the UML does not specify a diagram capable o
creating a model of a GUI's visual appearance. However, coupling GUI design to softwar
design more tightly is desirable to create a complete model of an application prior t
implementation, thus to avoid as much errors as possible. A GUI Layout Diagram consists of
Screen, which contains multiple ScreenAreas. Each may be decorated with one or morStereotypes, representing performed functionalities like text, image or link. By nesting an
arranging properly stereotyped ScreenAreas within each other, the developer is able to creat
an abstract version of a user interface. The Navigational Diagram provides UML-base
support for common design artifacts like storyboards and sitemaps. The diagrams created can
be linked to Use Case modeling using existing UML mechanisms to specify requirements an
context of a particular screen. Additionally, GUI Layout Diagrams may be used wit
Activities to model workflows and interaction.
By aligning the architecture of our profile with UML'
extension mechanisms and by using the inherent layout information added to UML 2.0 b
Diagram Interchange.
2
8/2/2019 Uml Final1
3/38
Contents-
1) About UML
2) Types Of UML Diagram
3) Class Diagram
4) Activity Diagram
5) Use Case Diagram
6) Sequence Diagram
7) Data Flow
8) E-R Diagram
9) Deployment Diagram
10) Object Diagram
11) Testing
3
8/2/2019 Uml Final1
4/38
What is UML?
UML Unified Modeling Language
Standard language for specifying, visualizing,
constructing and documenting the artifacts of
software systems.
Collection of best engineering practices that
have proven successful in modeling large
and complex systems.
4
8/2/2019 Uml Final1
5/38
Structural diagrams Used to describe
the building blocks of the system
features that do not change with time.
These diagrams answer the question
What's there?
Behavioral diagramsUsed to show
how the system evolves over time(responds to requests, events, etc.)
5
8/2/2019 Uml Final1
6/38
Types of UML Diagrams
UML defines nine types of diagrams:
Class (package)
Object
Use case
Sequence
Collaboration
Statechart
Activity
Component
Deployment
Dataflow
6
8/2/2019 Uml Final1
7/38
CLASS DIAGRAM
Class diagrams are the backbone of almost every object-oriented method includin
UML. They describe the static structure of a system.
Basic Class Diagram Symbols and Notations
Classes represent an abstraction of entities with common characteristics. Association
represent the relationships between classes.
Illustrate classes with rectangles divided into compartments. Place the name of the clas
in the first partition (centered, bolded, and capitalized), list the attributes in the secon
partition, and write operations into the third.
Active Class
Active classes initiate and control the flow of activity, while passive classes store dat
and serve other classes. Illustrate active classes with a thicker border.
Visibility
7
8/2/2019 Uml Final1
8/38
Use visibility markers to signify who can access the information contained within
class. Private visibility hides information from anything outside the class partition
Public visibility allows all other classes to view the marked information. Protecte
visibility allows child classes to access information they inherited from a parent class.
Associations
Associations represent static relationships between classes. Place association name
above, on, or below the association line. Use a filled arrow to indicate the direction o
the relationship. Place roles near the end of an association. Roles represent the way th
two classes see each other.
Multiplicity (Cardinality)
Place multiplicity notations near the ends of an association. These symbols indicate th
number of instances of one class linked to one instance of the other class. For example
one company will have one or more employees, but each employee works for on
company only.
8
8/2/2019 Uml Final1
9/38
Constraint
Place constraints inside curly braces {}.
9
8/2/2019 Uml Final1
10/38
DESCRIPTION:-
In this class diagram the main class is customer,account,queries,response and password and username is its sub-
class. Sub class contain many attributes such as register, delete, update, view. Registration contain custid, name
add, city, state,email address , phone no. Cancellation contains only one attribute that is customer id. Updation
contain custid,and complaint details.
Composition and Aggregation
Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, an
Class B, its part. Illustrate composition with a filled diamond. Use a hollow diamond to represent a simpl
aggregation relationship, in which the "whole" class plays a more important role than the "part" class, but th
two classes are not dependent on each other. The diamond end in both a composition and aggregatio
relationship points toward the "whole" class or the aggregate.
10
8/2/2019 Uml Final1
11/38
Generalization
Generalization is another name for inheritance or an "is a" relationship. It refers to a relationship between tw
classes where one class is a specialized version of another. For example, Honda is a type of car. So the clas
Honda would have a generalization relationship with the class car.
11
8/2/2019 Uml Final1
12/38
ACTIVITY DIAGRAMS
An activity diagram illustrates the dynamic nature of a system b
modeling the flow of control from activity to activity. An activity represents an operation on some class in th
system that results in a change in the state of the system. Typically, activity diagrams are used to mode
workflow or business processes and internal operation. Because an activity diagram is a special kind o
statechart diagram, it uses some of the same modeling conventions.
Basic Activity Diagram Symbols and Notations
Action states
Action states represent the noninterruptible actions of objects. You can draw an action state in SmartDraw usin
a rectangle with rounded corners.
Action Flow
Action flow arrows illustrate the relationships among action states.
Object Flow
Object flow refers to the creation and modification of objects by activities. An object flow arrow from an actio
to an object means that the action creates or influences the object. An object flow arrow from an object to a
action indicates that the action state uses the object.
12
8/2/2019 Uml Final1
13/38
Initial State
A filled circle followed by an arrow represents the initial action state.
Final State
An arrow pointing to a filled circle nested inside another circle represents the final action state.
Branching
A diamond represents a decision with alternate paths. The outgoing alternates should be labeled with a conditio
or guard expression. You can also label one of the paths "else."
Synchronization
A synchronization bar helps illustrate parallel transitions. Synchronization is also called forking and joining.
13
8/2/2019 Uml Final1
14/38
Activity diagram for Customer:
Activity diagram
14
8/2/2019 Uml Final1
15/38
USE CASE DIAGRAM
Use case diagrams model the functionality of a system using
actors and use cases. Use cases are services or functions provided by the system to its users.
Use cases. A use case describes a sequence of actions that provide something of measurable value to an acto
and is drawn as a horizontal ellipse.
Actors An actor is a person, organization, or external system that plays a role in one or more interactions wit
your system. Actors are drawn as stick figures.
Associations between actors and use cases are indicated in use case diagrams by solid lines. An associatio
exists whenever an actor is involved with an interaction described by a use case.
Associations are modeled as lines connecting use cases and actors to one another, with an optional arrowhea
on one end of the line.
The arrowhead is often used to indicating the direction of the initial invocation of the relationship or to indicat
the primary actor within the use case.
The arrowheads are typically confused with data flow and as a result I avoid their use.
UML defines 3 kinds of associations:
Association defines a relationship between an
actorand a use case.
Extend - defines that instances of a use case may be
augmented with some additional behavior defined in
an extending use case.
Uses - defines that a use case uses a behavior
defined in anotheruse case.
15
8/2/2019 Uml Final1
16/38
Basic Use Case Diagram Symbols and Notations
System
Draw your system's boundaries using a rectangle that contains use cases. Place actors outside the system'
boundaries.
Use Case
Draw use cases using ovals. Label with ovals with verbs that represent the system's functions.
Actors
Actors are the users of a system. When one system is the actor of another system, label the actor system with th
actor stereotype.
16
8/2/2019 Uml Final1
17/38
Relationships
Illustrate relationships between an actor and a use case with a simpl
line. For relationships among use cases, use arrows labeled either "uses" or "extends." A "uses" relationshi
indicates that one use case is needed by another in order to perform a task. An "extends" relationship indicate
alternative options under a certain use case.
17
8/2/2019 Uml Final1
18/38
DESCRIPTON:
In this use case diagram actor is customer and does all operations. First he login and then make registration for
complaints. After registering the complaint the customer can cancel that registered complaint or he can also
update that complaint.
18
8/2/2019 Uml Final1
19/38
SEQUENCE DIAGRAM
Sequence diagrams describe interactions among classes in terms o
an exchange of messages over time.
A sequence diagram in a Unified Modeling Language(UML) is kind of interaction diagram that shows how processes operate with one another and in what order. It is
construct of a Message Sequence Chat. A sequence diagram shows object interactions arranged in tim
sequence. It depicts the objects and classes involved in the scenario and the sequence of messages exchange
between the objects needed to carry out the functionality of the scenario. Sequence diagrams typically ar
associated with use case realizations in the Logical View of the system under development.
A sequence diagram shows, as parallel vertical lines (lifelines
different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchange
between them, in the order in which they occur. This allows the specification of simple runtime scenarios in
graphical manner.
If the lifeline is that of an object, it demonstrates a role. Note that
leaving the instance name blank can represent anonymous and unnamed instances.
In order to display interaction, messages are used. These are horizonta
arrows with the message name written above them.
Sequence diagrams are sometimes called event diagrams, even
scenarios, and Timing diagrams.
19
8/2/2019 Uml Final1
20/38
Basic Sequence Diagram Symbols and Notations
Class roles
Class roles describe the way an object will behave in context. Use the UML object symbol to illustrate clas
roles, but don't list object attributes.
Activation
Activation boxes represent the time an object needs to complete a task.
Messages
Messages are arrows that represent communication between objects. Use half-arrowed lines to represen
asynchronous messages. Asynchronous messages are sent from an object that will not wait for a response from
the receiver continuing its task.
20
8/2/2019 Uml Final1
21/38
Lifelines
Lifelines are vertical dashed lines that indicate the object's presence over time.
Destroying Objects
Objects can be terminated early using an arrow labeled ">" that points to an X.
Loops
A repetition or loop within a sequence diagram is depicted as a rectangle. Place the condition for exiting th
loop at the bottom left corner in square brackets [ ].
21
8/2/2019 Uml Final1
22/38
Sequence diagram for Admin Login:-
Sequence diagram for Admin Login
22
8/2/2019 Uml Final1
23/38
Sequence diagram for Client Login:-
Sequence diagram for Client Login
23
8/2/2019 Uml Final1
24/38
Sequence diagram for Registering the complaint:-
Sequence diagram for Registering the complaint
24
8/2/2019 Uml Final1
25/38
Sequence diagram for Query:-
Sequence diagram for Query
25
8/2/2019 Uml Final1
26/38
Sequence diagram for Searching the complaint-
Sequence diagram for Searching the property
26
8/2/2019 Uml Final1
27/38
DATA FLOW DIAGRAM
DFDs show the flow of data from external entities into the system,
how the data moves from one process to another, as well as its logical storage. The DFD is an excellent
communication tool for analysts to model processes and functional requirements. There are two purpose of
using data flow diagrams:
Define data flow and transformations.
Specify functions that performs transform data.
A data flow diagram (DFD) is a graphical representation of the
"flow" of data through an information system, modeling its process aspects. Often they are a preliminary step
used to create an overview of the system which can later be elaborated.DFDs can also be used for the
visualization of data processing (structured design).
A DFD shows what kinds of data will be input to and output from the
system, where the data will come from and go to, and where the data will be stored.
It does not show information about the timing of processes, or
information about whether processes will operate in sequence or in parallel.
It is common practice to draw the context-level data flow diagram firs
which shows the interaction between the system and external agents which act as data sources and data sinks
On the context diagram the system's interactions with the outside world are modeled purely in terms of dat
flows across the system boundary.
Data flow diagrams (DFDs) are one of the three essential perspectives o
the structured-systems analysis and design method SSADM.
The sponsor of a project and the end users will need to be briefed and
consulted throughout all stages of a system's evolution.
Sample Of Data Flow Diagram :
27
8/2/2019 Uml Final1
28/38
Level 0 Data Flow Diagram :
28
8/2/2019 Uml Final1
29/38
Level 1 Data Flow Diagram:
DESCRIPTION:-
In this diagram user first login at zero level dfd. Then in 1sr level it
registered the customer detail. After this in 2nd level user booked or cancel or update the tour package choosen
by customer.after that user generate bill.
29
GetPassword
0.3
ReadInput File
0.1
FileEncryption
0.2
Data store
File
Valid Data
RESULT
8/2/2019 Uml Final1
30/38
E-R DIAGRAM
An entity-relationship (ER) diagram is a specialized graphic that illustrate
the interrelationships between entities in a database. The E-R data model grew out of the exercise of using
commercially available DBMS's to model the database. The E-R model is the generalization of the earlier
available commercial models like the Hierarchical and the Network Model. It also allows the representation of
the various constraints as well as their relationships.
Entity Relationship and attributesare the basic thin in ER model.
E-R Diagram, also known as entity-relationship model .
ER diagrams often use symbols to represent three different types of information.
= used to represent entities.
= used to represent relationships.
= used to represent attributes.
30
8/2/2019 Uml Final1
31/38
31
CUSTOMER
HAVE
PRODUCTS/INQUIRIES
REGI
STER
COMPLAINT HAVE
STATUS
ModelNo
PROBLEM
NAME
STATE
CONACT
ADDRESS
CITY
8/2/2019 Uml Final1
32/38
DEPLOYMENT DIAGRAM
Deployment diagrams depict the physical resources in a system including nodes, components, and connections.
Basic Deployment Diagram Symbols and Notations
Component
A node is a physical resource that executes code components.
Association
Association refers to a physical connection between nodes, such as Ethernet.
Components and Nodes
Place components inside the node that deploys them.
32
8/2/2019 Uml Final1
33/38
STATECHART DIAGRAM
A statechart diagram shows the behavior of classes i
response to external stimuli. This diagram models the dynamic flow of control from state t
state within a system.
Basic Statechart Diagram Symbols and Notations
States
States represent situations during the life of an objec
You can easily illustrate a state in SmartDraw by using a rectangle with rounded corners.
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.
33
8/2/2019 Uml Final1
34/38
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 fina
state.
Synchronization and Splitting of Control
A short heavy bar with two transitions entering i
represents a synchronization of control. A short heavy bar with two transitions leaving irepresents a splitting of control that creates multiple states.
OBJECT DIAGRAM
34
8/2/2019 Uml Final1
35/38
Object diagrams are also closely linked to class diagrams. Just as an object is an instance of
class, an object diagram could be viewed as an instance of a class diagram. Object diagram
describe the static structure of a system at a particular time and they are used to test th
accuracy of class diagrams.
Basic Object Diagram Symbols and Notations
Object names
Each object is represented as a rectangle, which contains the name of the object and its clas
underlined and separated by a colon.
Object attributes
As with classes, you can list object attributes in a separate compartment. However, unlik
classes, object attributes must have values assigned to them.
Active object
35
8/2/2019 Uml Final1
36/38
Objects that control action flow are called active objects. Illustrate these objects with a thicke
border.
Multiplicity
You can illustrate multiple objects as one symbol if the attributes of the individual objects ar
not important.
Links
Links are instances of associations. You can draw a link using the lines used in class diagrams
Self-linked
Objects that fulfill more than one role can be self-linked. For example, if Mark, a
administrative assistant, also fulfilled the role of a marketing assistant, and the two position
are linked, Mark's instance of the two classes will be self-linked.
TESTING:
36
8/2/2019 Uml Final1
37/38
Testing is a set of activities that can be planned in advance and conducte
systematically. The proposed system is tested in parallel with the software that consists of its own phases o
analysis, implementation, testing and the software engineering process may be considered as a series of step
where initially, system engineering defines the role of software and leads to software requirement analysis
where the domain, function, behavior, performance, constraints, and validation criteria for software ar
established. Moving downwards in the list we have design and finally coding. To develop the software, w
move upwards that further decrease the level of abstraction on each turn.The scope of testing in this projec
extends up to the system (in order to ensure effective development of the software.
TEST CASES
Login:
Test
CaseNumber
Action Expected Result Success Comments
1. Username, password or
user type fields are left
blank and Login button
is clicked.
The user is prompted to
enter username or
password.
Yes
2. Click the submit button
with invalid username or
password .
Either the username or
password is incorrect.
Please check and re-login
Yes
3. Enter valid username and
password .
Navigation page
displayed on the user
login and user can begin
interaction. User is
provided with the
services
Yes
Table 1: Login Test cases
37
8/2/2019 Uml Final1
38/38
Register:
Test case
Number
Action Expected Result Success Comments
1. If user gives null values
of username , email id,
password (any field in
the form) & clicks on
submit button .
The user is prompted to
enter username or
password
Yes
2 If user selects a user_id
which is already assigned
to another user.
The user is prompted to
choose another username.
Yes
3. If email id entered by the
user is incorrect.
The user is asked to enter
valid email id.
Yes
4. If password & confirm
password fields do not
match i.e they are not
same.
The user is prompted to
reenter the password.
Yes
5. If user successfully
registers.
The user is provided with
all the services
Yes
Table 2: Register Test cases