Front Page
Front Page
Front Page
TECHNOLOGY
GREATER NOIDA-201306
(An Autonomous Institute)
Department of CSE
Session (2023-2024)
LAB FILE
ON
SOFTWARE ENGINEERING LAB
(ACSE0653)
(6th Semester)
Draw the use case diagram and specify the role of each of the actors. Also state the
precondition, post condition and function of each use case.
Draw the activity diagram.
Identify the classes. Classify them as weak and strong classes and draw the class
diagram.
Draw the sequence diagram for any two scenarios.
Draw the collaboration diagram.
Draw the state chart diagram.
Draw the component diagram.
Draw the deployment diagram
Description for an ATM System (Problem Statement)
The ATM will communicate each transaction to the bank and obtain verification that
it was allowed by the bank. Ordinarily, a transaction will be considered complete by
the bank once it has been approved. In the case of a deposit, a second message will be
sent to the bank indicating that the customer has deposited the envelope. (If the
custom-er fails to deposit the envelope within the timeout period, or presses cancel
instead, no second message will be sent to the bank and the deposit will not be
credited to the customer.)
If the bank determines that the customer's PIN is invalid, the customer will be
required to re-enter the PIN before a transaction can proceed. If the customer is
unable to successfully enter the PIN after three tries, the card will be permanently
retained by the machine, and the customer will have to contact the bank to get it back
If a transaction fails for any reason other than an invalid PIN, the ATM will display
an explanation of the problem, and will then ask the customer whether he/she wants
to do another transaction. The ATM will provide the customer with a printed receipt
for each successful transaction
The ATM will have a key-operated switch that will allow an operator to start
and stop the servicing of customers. After turning the switch to the "on" position, the
operator will be required to verify and enter the total cash on hand. The machine can
only be turned off when it is not servicing a customer. When the switch is moved to
the "off" position, the machine will shut down, so that the operator may remove
deposit envelopes and reload the machine with cash, blank receipts, etc.
INTRODUCTION ABOUT LAB
Characteristics of CASE:
The unified modelling language (UML) is a standard language for writing software
blue prints. The UML is a language for
Visualizing
Specifying
Constructing
Documenting
UML is a language that provides vocabulary and the rules for combing words in that
vocabulary for the purpose of communication.
A modelling language is a language whose vocabulary and rules focus on the concept
and physical representation of a system. Vocabulary and rules of a language tell us how to
create and real well-formed models, but they do not tell you what model you should create
and when should create them.
Visualizing
The UML is more than just a bunch of graphical symbols. In UML each symbol has
well-defined semantics. In this manner one developer can write a model in the UML and
another developer or even other tools can interpret the model unambiguously.
Specifying
UML is used for specifying means building models that are precise, unambiguous,
and complete. UML addresses the specification of all the important analysis, design and
implementation decisions that must be made in developing and deploying a software
intensive system.
Constructing
UML is not a visual programming language but its models can be directly connected
to a variety of programming languages. This means that it is possible to map from a model in
the UML to a programming language such as java, C++ or Visual Basic or even to tables in a
relational database or the persistent store of an object-oriented database. This mapping
permits for-ward engineering. The generation of code from a UML model into a
programming language. The reverse engineering is also possible you can reconstruct a model
from an implementation back into the UML.
Documenting
To understand the UML, we need to form a conceptual model of the language and this
requires learning three major elements.
The Rules that direct how those building blocks may be put together. Some common
m-charisms that apply throughout the UML. As UML describes the real time systems it is
very important to make a conceptual model and then proceed gradually. Conceptual model of
UML can be mastered by learning the following three major elements:
UML building blocks. The building blocks of UML can be defined as:
Things
Relationships
Diagrams
Structural
Behavioural
Grouping
A notational
Structural things:
Class: A class is the descriptor for a set of objects with similar structure, behaviour, and
relationships.
It is represented by a rectangle.
Directed Association
Aggregation and
Composition
Association:
An association is a structural relationship that specifies the relation between two objects
when they are at the same level (peer level systems).
An Association can specify the relationship, role of the class and Multiplicity.
An Association used in class diagram, Component diagram, deployment diagram, usecase
diagrams.
The multiplicity can be represented as 1-1..*,*,0…1.
It is represented as follows:
Directed Association:
Links a semantic association between two classes in the UML diagram.
Directed association is used in class diagram, Component diagram, deployment
diagram, use case diagrams.
Symbol:
Aggregation:
Links a semantic association between two classes in the UML diagram.
Aggregation is used in class diagram.
Symbol:
Composition:
Links a semantic association between two classes in the UML diagram.
Composition is used in class diagram.
Symbol:
Generalization:
Generalization is a specification relationship in which objects of the specialized element
(the child) are substitutable for objects of the generalization element (the parent). It is used in
class diagram.
Symbol:
Dependency:
A dependency is a semantic relationship in which if there is any change occurred in one
object that may affect other object. Dependency is used in class diagram, Component
diagram, deployment diagram, use case diagrams.
Symbol:
------------------------------------------
Realization:
Realization is a Specified tool that can be represented by providing a relationship with
classifier. Dependency is used in class diagram, Component diagram, deployment
diagram, use case diagrams.
Symbol:
----------------------------------------------
Class diagrams:
A class diagram is that which represents a set of classes, interfaces, and collaborations
and their relationships, graphically a class diagram is a collection of vertices and arcs.
It consists of three compartments.
Name
Attributes
Operations
Uses: A class diagram is used to model the static design view of a system.
Object diagrams:
An object diagram shares the same common properties of all other diagrams.
Name
Attributes
Operations
Uses: An object diagram is used to model the static design view of a system.
Actor
Uses: A Use case diagram is used to model the static design view of a system.
Interaction Diagrams:
An Interaction diagram shares the same common properties as all other diagrams. It
differs in its contents
Objects
Links
Messages
It includes two diagrams – Sequence and Collaboration
Sequence Diagrams:
A sequence diagram emphasizes the time ordering of messages. Sequence diagrams have
two features that distinguish them from collaboration diagrams.
(i)Object life time
(ii)The focus of
control
Collaboration Diagrams:
A collaboration diagram emphasizes the organization of the objects that participate in an
interaction
Collaboration diagrams have two features that distinguish them from sequence
diagrams.
(i)Path
(ii) The Sequence numbers
Object: It is an instance of a class.
Call:
Send:
Return: ------------------------------------------
Create:
<<create>>
Destroy:
<<destroy>>
Uses: Interaction diagrams are used to model the dynamic aspects of a system. It is obtained
in two ways:
(i) To model flows of control by time ordering.
(ii) To model flows of control by organization.
Symbol:
State Name
Sub machine State: A submachine state is a syntactical convenience that facilitates reuse and
modularity. It is shorthand that implies a macro-like expansion by another state machine and is
Symbol:
Initial State:
An initial is a kind of pseudo state that represents the starting point in a region of a state
ma-chine. It has a single outgoing transition to the default state of the enclosing region, and
has no incoming transitions. There can be one (and only one) initial state in any given
region of a state machine. It is not itself a state but acts as a marker.
Symbol:
Final State: A final state represents the last or "final" state of the enclosing composite
state.There may be more than one final state at any level signifying that the composite state
can end in different ways or conditions. When a final state is reached and there are no other
enclosing states it means that the entire state machine has completed its transitions and no
more transitions can occur.
Symbol:
Junction Point: Junction Point chains together transitions into a single run-to-completion
path.May have multiple input and/or output transitions. Each complete path involving a
junction is logically independent and only one such path fires at one time. May be used to
construct branches and merges.
Symbol:
Transition: A transition is a directed relationship between a source state vertex and a target
state vertex. It may be part of a compound transition, which takes the state machine from one
state configuration to another, representing the complete response of the state machine to a
par-tabular event instance.
Symbol:
Activity Diagram:
It represents the different activities in the system.
Action State: An action state represents the execution of an atomic action, typically the
invocation of an operation. An action state is a simple state with an entry action whose only
exit transition is triggered by the implicit event of completing the execution of the entry
action. The state therefore corresponds to the execution of the entry action itself and
the outgoing transition is activated as soon as the action has completed its execution.
Symbol:
Sub Activity State: A sub activity state represents the execution of a non-atomic sequence of
-steps that has some duration; that is, internally it consists of a set of actions and possibly
waiting for events. That is, a sub activity state is a hierarchical action, where an associated
sub activity graph is executed.
Symbol:
Sub Activity Name
Initial State: An initial is a kind of pseudo state that represents the starting point in a region
of a state machine. It has a single outgoing transition to the default state of the enclosing
region, and has no incoming transitions. There can be one (and only one) initial state in any
given region of a state machine. It is not itself a state but acts as a marker.
Symbol:
Final State: A final state represents the last or "final" state of the enclosing composite state.
There may be more than one final state at any level signifying that the composite state can
end in different ways or conditions. When a final state is reached and there are no other
enclosing states it means that the entire state machine has completed its transitions and no
more transitions can occur.
Symbol:
Component Diagrams:
Symbol:
Symbol:
<<Artifact>>
Deployment Diagrams:
Node: A node is a run-time physical object that represents a computational resource,
generally having at least a memory and often processing capability as well, and upon which
components may be deployed.
Symbol:
Node
Name
Symbol:
NodeName
Symbol:
<<Artifacts>>
ARCHITECTURE OF UML
Any real-world system is used by different users. The users can be developers, testers,
business people, analysts and many more. So before designing a system the architecture is
made with different perspectives in mind. The most important part is to visualize the system
from different viewer’s perspective. The better we understand the better we make the system.
UML plays an important role in defining different perspectives of a system. These
perspectives are:
Design
Implementation
Process
Deployment
And the centre is the Use Case view which connects all these four. A Use case represents
the functionality of the system. So the other perspectives are connected with use case.
Design of a system consists of classes, interfaces, and collaboration. UML provides class
diagram, object diagram to support this. Implementation defines the components assembled
together er to make a complete physical system. UML component diagram is used to support
implementation perspective.
Process defines the flow of the system. So the same elements as used in Design are also
used to support this perspective.
Deployment represents the physical nodes of the system that forms the hardware. UML
deployment diagram is used to support this perspective.
Automatic Teller Machine
Overview:
To model a system the most important aspect is to capture the dynamic behaviour. To
clarify a bit in details, dynamic behaviour means the behaviour of the system when it is
running operating. So only static behaviour is not sufficient to model a system rather dynamic
behaviour is more important than static behaviour. In UML there are five diagrams available
to model dynamic nature and use case diagram is one of them. Now as we must discuss that
the use case diagram is dynamic in nature there should be some internal or external factors
for making the interaction. These internal and external agents are known as actors. So, use
case diagrams are consists of actors, use cases and their relationships. The diagram is used to
model the system/subsystem of an application. A single use case diagram captures a particular
functionality of a system. So, to model the entire system numbers of use case diagrams are
used.
Purpose:
The purpose of use case diagram is to capture the dynamic aspect of a system. But
this definition is too generic to describe the purpose. Because other four diagrams (activity,
sequence, collaboration, and State chart) are also having the same purpose. So, we will
investigate some specific purpose which will distinguish it from other four diagrams. Use
case diagrams are used to gather the requirements of a system including internal and external
influences. These requirements are mostly design requirements. So when a system is analysed
to gather its functionalities use cases are prepared and actors are identified.
A deposit transaction asks the customer to choose a type of account to deposit to (e.g.
checking) from a menu of possible accounts, and to type in a dollar amount on the keyboard.
The transaction is initially sent to the bank to verify that the ATM can accept a deposit from
this customer to this account. If the transaction is approved, the machine accepts an envelope
from the customer containing cash and/or checks before it issues a receipt. Once the envelope
has been received, a second message is sent to the bank, to confirm that the bank can credit
the customer’s account – contingent on manual verification of the deposit envelope contents
by an operator later.
A deposit transaction can be cancelled by the customer pressing the Cancel key any
time prior to inserting the envelope containing the deposit. The transaction is automatically
cancelled if the customer fails to insert the envelope containing the deposit within a
reasonable period of time after being asked to do so.
A transfer transaction asks the customer to choose a type of account to transfer from
(e.g. checking) from a menu of possible accounts, to choose a different account to transfer to,
and to type in a dollar amount on the keyboard. No further action is required once the
transaction is approved by the bank before printing the receipt.
A transfer transaction can be cancelled by the customer pressing the Cancel key any
time prior to entering a dollar amount.
An inquiry transaction asks the customer to choose a type of account to inquire about
from a menu of possible accounts. No further action is required once the transaction is
approved by the bank before printing the receipt. An inquiry transaction can be cancelled by
the customer pressing the Cancel key any time prior to choosing the account to inquire about.
This usecase is for validate the user i.e check the pin number, when the bank reports
that the customer’s transaction is disapproved due to an invalid PIN. The customer is required
to re-enter the PIN and the original request is sent to the bank again. If the bank now
approves the transaction, or disapproves it for some other reason, the original use case is
continued; otherwise the process of re-entering the PIN is repeated. Once the PIN is
successfully re-entered
If the customer fails three times to enter the correct PIN, the card is permanently
retained, a screen is displayed informing the customer of this and suggesting he/she contact
the bank, and the entire customer session is aborted.
PrintBill usecase
Update Account
This use case is for updating corresponding user accounts after transactions (withdraw
or deposit or transfer) are completed.