Professional Documents
Culture Documents
SE II Unit Notes
SE II Unit Notes
Requirement analysis and specification – Requirements gathering and analysis – Functional and Non Functional
requirements – Software Requirement Specification – Formal system specification – Finite State Machines – Petrinets
– Object modelling using UML – Use case Model – Class diagrams – Interaction diagrams – Activity diagrams –
Functional modelling – Data Flow Diagram- CASE TOOLS.
● All plan-driven life cycle models prescribe that before starting to develop a software, the exact requirements of the
customer must be understood and documented.
● Starting development work without properly understanding and documenting the requirements increases the number
of iterative changes in the later life cycle phases, and thereby alarmingly pushes up the development costs.
● A good requirements document not only helps to form a clear understanding of various features required from the
software, but also serves as the basis for various activities carried out during later life cycle phases.
● The requirements analysis and specification phase starts after the feasibility study stage is complete and the project
has been found to be financially viable and technically feasible.
● The requirements analysis and specification phase ends when the requirements specification document has been
developed and reviewed.
● The requirements specification document is usually called the software requirements specification (SRS) document.
● The goal of the requirements analysis and specification phase is to clearly understand the customer requirements and
to systematically organize the requirements into a document called the Software Requirements Specification (SRS)
document.
● Requirements analysis and specification activity is usually carried out by a few experiencedmembers of the
development team.
● It normally requires them to spend some time at the customer site.
● The engineers who gather and analyze customer requirements and then write therequirements specification
document are known as system analysts.
Requirements analysis and specification phase mainly involves carrying out the following two important activities:
● Requirements gathering and analysis.
● Requirements specification.
● The complete set of requirements are almost never available in the form of a singledocument from the customer.
● Complete requirements are rarely obtainable from any single customer representative.
● We can conceptually divide the requirements gathering and analysis activity into two separate tasks:
Requirements gathering and Requirements Analysis
Requirements gathering.
Requirements analysis:
● After requirements gathering is complete, the analyst analyses the gathered requirements to form a clear
understanding of the exact customer requirements and to weed out any problems in the gathered requirements.
● During requirements analysis, the analyst needs to identify and resolve three main types of problems in the
requirements:
○ Anomaly:
■ An anomaly is an ambiguity in a requirement. When a requirement is anomalous, several interpretations of that
requirement are possible.
■ Example: While gathering the requirements for a process control application, the following requirement was
expressed by a certain stakeholder: “When the temperature becomes high, the heater should be switched off”.
Please note that words such as “high”, “low”, “good”, “bad” etc. are indications of ambiguous requirements as
these lack quantification and can be subjectively interpreted.
○ Inconsistency:
■ Two requirements are said to be inconsistent, if one of the requirements contradicts the other.
■ Example: Consider the following two requirements that were collected from two different stakeholders in a
process control application development project.
● The furnace should be switched-off when the temperature of the furnace risesabove 500℃.
● When the temperature of the furnace rises above 500℃, the water shower should be switched-on and the
furnace should remain on.
○ Incompleteness:
■ An incomplete set of requirements is one in which some requirements have been overlooked. The lack of
these features would be felt by the customer much later, possibly while using the software.
■ Example: In a chemical plant automation software, suppose one of the requirements is that if the internal
temperature of the reactor exceeds 200℃ then an alarm bell must be sounded. However, on an examination
of all requirements, it was found that there is no provision for resetting the alarm bell after the temperature
has been brought down in any of the requirements. This is clearly an incomplete requirement.
Software Requirements Specification (SRS):
● After the analyst has gathered all the required information regarding the software to be developed, and has removed all
incompleteness, inconsistencies, and anomalies from the specification, he starts to systematically organize the
requirements in the form of an SRS document.
● The SRS document usually contains all the user requirements in a structured though an informal form.SRS document is
probably the most important document and is the toughest to write.
● One reason for this difficulty is that the SRS document is expected to cater to the needs of a wide variety of audience.
● A well-formulated SRS document finds a variety of usage:
○ Forms an agreement between the customers and the developers.
○ Reduces future reworks.
○ Provides a basis for estimating costs and schedules
○ Provides a baseline for validation and verification
○ Facilitates future extensions
● IEEE Recommended Practice for Software Requirements Specifications describes thecontent and qualities of a good
software requirements specification (SRS).
● Some of the identified desirable qualities of an SRS document are the following:
○ Concise: The SRS document should be concise and at the same time unambiguous,consistent, and complete.
○ Implementation-independent:
The SRS should be free of design and implementation decisions unless those decisions reflect actual requirements. It
should only specify what the system should do and refrain from stating how to do these.
○ Traceable:
It should be possible to trace a specific requirement to the design elements that implement it and vice versa. Similarly,
it should be possible to trace a requirement to the code segments that implement it and the test cases that test this
requirement and vice versa.
○ Modifiable:
Customers frequently change the requirements during the software development due to a variety of reasons.
Therefore, in practice the SRS document undergoes several revisions during software development. To cope up with
the requirementschanges, the SRS document should be easily modifiable. For this, an SRS document should be well-
structured.
○ Identification of response to undesired events:
The SRS document should discuss the system responses to various undesired events and exceptional conditions that
may arise.
○ Verifiable:
All requirements of the system as documented in the SRS document should be verifiable. This means that it should
be possible to design test cases based onthe description of the functionality as to whether or not requirements have
been met in an implementation.
Functional Requirements:
● The functional requirements capture the functionalities required by the users from the system.
● Consider a software as offering a set of functions {fi} to the user.
● These functions can be considered similar to a mathematical function f : I → O, meaning that a function transforms
an element (ii) in the input domain (I) to a value (oi) in the output (O).
● In order to document the functional requirements of a system, it is necessary to first learn to identify the high-level
functions of the systems by reading the informal documentation of the gathered requirements.
● Each high-level function is an instance of use of the system (use case) by the user in some way.
● A high-level function is one using which the user can get some useful piece of work done.
● Each high-level requirement typically involves accepting some data from the user through a user interface,
transforming it to the required response, and then displaying the system response in proper format.
● A high-level function transforms certain input data to output data.
● Except for very simple high- level functions, a function rarely reads all its required data inone go and rarely
outputs all the results in one shot.
● A high-level function usually involves a series of interactions between the system and one or more users.
● Functional requirements form the basis for most design and test methodologies.
● Unless the functional requirements are properly identified and documented, the design and testing activities cannot
be carried out satisfactorily.
● Once all the high-level functional requirements have been identified and the requirements problems have been
eliminated, these are documented.
● A function can be documented by identifying the state at which the data is to be input to thesystem, its input data
domain, the output data domain, and the type of processing to be carried on the input data to obtain the output data.
● Refer to Withdraw cash from ATM example in text book.
Non-functional Requirements:
● The non-functional requirements are non-negotiable obligations that must be supported by the software.
● The non-functional requirements capture those requirements of the customer that cannot be expressed as functions.
● Aspects concerning external interfaces, user interfaces, maintainability, portability, usability,maximum number of
concurrent users, timing, and throughput.
● The non-functional requirements can be critical in the sense that any failure by the developed software to achieve
some minimum defined level in these requirements can be considered as a failure and make the software
unacceptable by the customer.
● Design and implementation constraints:
○ Design and implementation constraints are an important category of non-functional requirements describing
any items or issues that will limit the options available to the developers.
○ Some of the example constraints can be—corporate or regulatory policies that need to be honored; hardware
limitations; interfaces with other applications; specific technologies, tools, and databases to be used; specific
communications protocols to be used; security considerations etc.
● External interfaces required:
○ Examples of external interfaces are - hardware, software and communicationinterfaces, user interfaces,
report formats, etc.
○ To specify the user interfaces, each interface between the software and the usersmust be described.
○ One example of a user interface requirement of a software can be that it should beusable by factory shop
floor workers who may not even have a high school degree
● Other non-functional requirements:
● This section contains a description of non- functional requirements that are neither design constraints nor
are external interface requirements.
● An important example is a performance requirement such as the number oftransactions completed per unit
time.
Goals of implementation:
● The ‘goals of implementation’ part of the SRS document offers some general suggestions regarding the software to
be developed.
● A goal, in contrast to the functional and nonfunctional requirements, is not checked by the customer for conformance
at the time of acceptance testing.
● The goals of the implementation section might document issues such as easier revisions tothe system functionalities
that may be required in the future, easier support for new devicesto be supported in the future, reusability issues, etc.
Hardware interfaces: This section should describe the interface between the software andthe hardware components
of the system.
Software interfaces: This section should describe the connections between this software and other specific
software components, including databases, operating systems, tools, libraries, and integrated commercial
components, etc.
Communications interfaces: This section should describe the requirements associated with any type of
communications required by the software, such as e-mail, web access, network server communications protocols,
etc.
Self Study:
Example Functional Requirements for Library Automation System in Text book.
Formal system specification is a process in software engineering where the behavior, requirements, and
constraints of a system are expressed using formal languages and mathematical notations. It provides
a rigorous and unambiguous description of the system, which helps in understanding, analyzing, and
verifying its properties. Formal specification techniques help in improving the quality, reliability, and
maintainability of software systems. Here are some key aspects of formal system specification:
1. Precision and Unambiguity: Formal specifications aim to remove ambiguity and provide precise
definitions of system behavior and requirements. This precision helps in avoiding misunderstandings
and inconsistencies during the software development process.
2. Expressiveness: Formal specification languages provide expressive power to describe complex
system behaviors, requirements, and constraints in a concise and structured manner. These languages
often include constructs for specifying data types, operations, state transitions, and temporal
properties.
3. Mathematical Foundation: Formal specification techniques are based on mathematical principles
and formalisms, such as set theory, predicate logic, automata theory, and formal semantics. These
mathematical foundations enable rigorous reasoning and analysis of system properties.
4. Abstraction and Modularity: Formal specifications allow the system to be described at different
levels of abstraction, from high-level requirements to low-level implementation details. Modularity
in specifications facilitates the decomposition of complex systems into smaller, more manageable
components.
5. Verification and Validation: Formal specifications support formal methods for verifying and
validating system properties, such as consistency, completeness, correctness, and conformance to
requirements. Techniques such as model checking, theorem proving, and simulation are used to
analyze the behavior of the system against its specification.
6. Documentation and Communication: Formal specifications serve as comprehensive
documentation of the system's behavior and requirements, which can be used to communicate design
decisions, constraints, and assumptions among stakeholders, including developers, testers, and users.
7. Tool Support: Various tools and automated techniques are available to support the formal
specification process, including specification languages, model checkers, theorem provers, and static
analyzers. These tools help in writing, analyzing, and maintaining formal specifications throughout
the software development lifecycle.
8. Integration with Development Process: Formal system specification is often integrated into the
software development process alongside other activities such as requirements analysis, design,
implementation, testing, and maintenance. It provides a foundation for systematic and disciplined
development practices.
Overall, formal system specification plays a crucial role in software engineering by providing a
rigorous and structured approach to defining system behavior and requirements, facilitating analysis,
verification, and validation, and ultimately improving the quality and reliability of software systems.
1. Modeling System Behavior: FSMs are used to model the behavior of systems that exhibit discrete
states and transitions between these states. These systems could range from simple vending
machines to complex protocol implementations.
2. Designing Stateful Components: FSMs help in designing stateful components where the behavior
of the component depends on its current state and the input it receives. By defining states and
transitions, developers can create systems that react in predictable ways to various inputs and
events.
3. Implementation of Protocols and Communication Systems: FSMs are extensively used in the
implementation of communication protocols and network systems. The states represent different
phases of the communication process, and transitions depict how the system responds to incoming
messages or events.
4. Validation and Verification: FSMs can be used to formally verify the correctness of systems by
analyzing their state spaces and ensuring that certain properties hold under different conditions.
Model checking techniques can be applied to automatically verify properties of FSMs.
5. Embedded Systems and Real-time Applications: In embedded systems and real-time applications,
where timing and resource constraints are critical, FSMs offer a structured approach to managing
system behavior. They can help in designing systems that respond to inputs within specific time
constraints and maintain correct behavior under various conditions.
6. Compiler Design and Parsing: FSMs play a crucial role in compiler design and parsing algorithms.
Lexical analyzers and parsers often use FSMs to recognize and process tokens and syntactic
structures in programming languages.
7. User Interface Design: FSMs can be applied in user interface design to model different states of an
application's user interface and transitions triggered by user actions. This approach helps in creating
intuitive and responsive user experiences.
8. Game Development: FSMs are commonly used in game development to model the behavior of
characters, game states, and game mechanics. They help in defining how entities in the game world
interact and respond to player input.
Overall, Finite State Machines provide a structured and formal approach to modeling and controlling
the behavior of systems in software engineering, making them a powerful tool for designing robust and
predictable software systems.
Petri Nets
Petri Nets are mathematical modeling languages used to describe and analyze systems characterized by
concurrent processes, synchronization, and resource sharing. They find applications in various
domains, including software engineering. Here's how Petri Nets are used in software engineering:
1. Concurrency Modeling: Petri Nets are effective in modeling concurrent systems where multiple
processes can execute simultaneously. In software engineering, concurrent systems are prevalent,
especially in multi-threaded and distributed applications. Petri Nets help in modeling the concurrent
behavior of such systems, including synchronization, communication, and resource sharing among
concurrent processes.
2. Workflow Modeling: Petri Nets are used to model and analyze workflows in software systems.
Workflow modeling involves representing the sequence of tasks or activities that need to be
performed to complete a process. Petri Nets can capture the dependencies between different tasks,
decision points, and concurrency aspects in workflows, enabling the analysis of process efficiency,
deadlock detection, and resource allocation.
3. Protocol Verification: Petri Nets are employed in the formal verification of communication
protocols and distributed systems. They help in specifying the expected behavior of protocols and
verifying properties such as deadlock freedom, liveliness, and message ordering. Petri Net-based
verification techniques ensure that communication protocols adhere to specified requirements and
standards.
4. Software Architecture Analysis: Petri Nets are used to model and analyze the behavior of software
architectures. They help in understanding the interactions between software components, the flow
of data and control among components, and the overall system behavior. Petri Net-based analysis
techniques aid in identifying potential bottlenecks, performance issues, and architectural flaws in
software systems.
5. Concurrency Control and Transaction Management: Petri Nets are applied in the design and
analysis of concurrency control mechanisms and transaction management protocols in database
systems. They help in modeling the concurrent execution of transactions, the coordination of
database accesses, and the prevention of conflicts and inconsistencies in data updates.
6. Formal Specification and Verification: Petri Nets serve as formal specification languages for
describing system behavior and requirements in software engineering. They provide a precise and
rigorous notation for capturing the dynamic behavior of software systems, facilitating formal
verification techniques such as model checking and theorem proving to ensure system correctness
and consistency.
7. Software Simulation and Testing: Petri Nets support software simulation and testing activities by
providing a graphical representation of system behavior and interactions. Software developers use
Petri Nets to simulate the execution of software systems, analyze performance metrics, and identify
potential issues such as deadlocks, livelocks, and resource contention.
Overall, Petri Nets are valuable modeling and analysis tools in software engineering, enabling the
formal representation, analysis, and verification of complex software systems and protocols. They help
in improving system reliability, performance, and maintainability by identifying and addressing design
flaws and concurrency-related issues early in the development lifecycle.
It is a general-purpose modeling language. The main aim of UML is to define a standard way
to visualize the way a system has been designed. It is quite similar to blueprints used in other
fields of engineering. UML is not a programming language, it is rather a visual language.
• Complex applications need collaboration and planning from multiple teams and hence require
a clear and concise way to communicate amongst them.
• Businessmen do not understand code. So UML becomes essential to communicate with non-
programmers about essential requirements, functionalities, and processes of the system.
• A lot of time is saved down the line when teams can visualize processes, user interactions,
and the static structure of the system.
UML is linked with object-oriented design and analysis. UML makes use of elements and forms
associations between them to form diagrams. Diagrams in UML can be broadly classified as:
0 seconds of 0 secondsVolume 0%
The most widely use UML diagram is the class diagram. It is the building block of all object
oriented software systems. We use class diagrams to depict the static structure of a system by
showing system’s classes, their methods and attributes. Class diagrams also help us identify
relationship between different classes or objects.
Composite Structure Diagram
We use composite structure diagrams to represent the internal structure of a class and its
interaction points with other parts of the system.
• A composite structure diagram represents relationship between parts and their configuration
which determine how the classifier (class, a component, or a deployment node) behaves.
• They represent internal structure of a structured classifier making the use of parts, ports, and
connectors.
• We can also model collaborations using composite structure diagrams.
• They are similar to class diagrams except they represent individual parts in detail as compared
to the entire class.
Object Diagram
An Object Diagram can be referred to as a screenshot of the instances in a system and the
relationship that exists between them. Since object diagrams depict behaviour when objects
have been instantiated, we are able to study the behaviour of the system at a particular instant.
1. An object diagram is similar to a class diagram except it shows the instances of classes in
the system.
2. We depict actual classifiers and their relationships making the use of class diagrams.
3. On the other hand, an Object Diagram represents specific instances of classes and
relationships between them at a point of time
Component Diagram
Component diagrams are used to represent how the physical components in a system have been
organized. We use them for modelling implementation details.
• Component Diagrams depict the structural relationship between software system
elements and help us in understanding if functional requirements have been covered by
planned development.
• Component Diagrams become essential to use when we design and build complex
systems.
• Interfaces are used by components of the system to communicate with each other.
Deployment Diagram
Deployment Diagrams are used to represent system hardware and its software.It tells us what
hardware components exist and what software components run on them.
• We illustrate system architecture as distribution of software artifacts over distributed
targets.
• An artifact is the information that is generated by system software.
• They are primarily used when a software is being used, distributed or deployed over
multiple machines with different configurations.
Package Diagram
We use Package Diagrams to depict how packages and their elements have been organized. A
package diagram simply shows us the dependencies between different packages and internal
composition of packages.
• Packages help us to organise UML diagrams into meaningful groups and make the
diagram easy to understand.
• They are primarily used to organise class and use case diagrams.
Behavioural UML Diagrams
Activity Diagrams
We use Activity Diagrams to illustrate the flow of control in a system. We can also use an
activity diagram to refer to the steps involved in the execution of a use case.
• We model sequential and concurrent activities using activity diagrams. So, we basically
depict workflows visually using an activity diagram.
• An activity diagram focuses on condition of flow and the sequence in which it happens.
• We describe or depict what causes a particular event using an activity diagram.
Use Case Diagrams are used to depict the functionality of a system or a part of a system. They
are widely used to illustrate the functional requirements of the system and its interaction with
external agents(actors).
• A use case is basically a diagram representing different scenarios where the system can
be used.
• A use case diagram gives us a high level view of what the system or a part of the
system does without going into implementation details.
Sequence Diagram
A sequence diagram simply depicts interaction between objects in a sequential order i.e. the
order in which these interactions take place.
• We can also use the terms event diagrams or event scenarios to refer to a sequence
diagram.
• Sequence diagrams describe how and in what order the objects in a system function.
• These diagrams are widely used by businessmen and software developers to document
and understand requirements for new and existing systems.
Communication Diagram
Timing Diagram are a special form of Sequence diagrams which are used to depict the behavior
of objects over a time frame. We use them to show time and duration constraints which govern
changes in states and behavior of objects.
An Interaction Overview Diagram models a sequence of actions and helps us simplify complex
interactions into simpler occurrences. It is a mixture of activity and sequence diagrams.
Use-Case Model
The Use-case model is defined as a model which is used to show how users interact with the system in
order to solve a problem. As such, the use case model defines the user's objective, the interactions
between the system and the user, and the system's behavior required to meet these objectives.
Various model elements are contained in use-case model, such as actors, use cases, and the association
between them.
We use a use-case diagram to graphically portray a subset of the model in order to make the
communication simpler. There will regularly be a numerous use-case diagram which is related to the
given model, each demonstrating a subset of the model components related to a specific purpose. A
similar model component might be appearing on a few use-case diagrams; however, each use-case
should be consistent. If, in order to handle the use-case model, tools are used then this consistency
restriction is automated so that any variations to the component of the model (changing the name, for
instance) will be reflected automatically on each use-case diagram, which shows that component.
Packages may include a use-case model, which is used to organize the model to simplify the analysis,
planning, navigation, communication, development and maintenance.
Various use-case models are textual and the text captured in the use-case specifications, which are
linked with the element of every use-case model. The flow of events of the use case is described with
the help of these specifications.
The use-case model acts as an integrated thread in the development of the entire system. The use-case
model is used like the main specification of the system functional requirements as the basis for design
and analysis, as the basis for user documentation, as the basis of defining test cases, and as an input to
iteration planning.
Origin of Use-Case
Nowadays, use case modeling is frequently connected with UML, in spite of the fact that it has been
presented before UML existed. Its short history is:
o Ivar Jacobson, in the year 1986, originally formulated textual and visual modeling methods to
specify use cases.
o And in the year 1992, his co-authored book named Object-Oriented Software Engineering - A Use
Case Driven Approach, assisted with promoting the strategy for catching functional requirements,
particularly in software development.
1. Actor
2. Use Case
3. Associations
Actor
Usually, actors are people involved with the system defined on the basis of their roles. An actor can be
anything such as human or another external system.
Use Case
The use case defines how actors use a system to accomplish a specific objective. The use cases are
generally introduced by the user to meet the objectives of the activities and variants involved in the
achievement of the goal.
Associations
Associations are another component of the basic model. It is used to define the associations among
actors and use cases they contribute in. This association is called communicates-association.
1. Subject
2. Use-Case Package
3. Generalizations
4. Generalizations
5. Dependencies
Subject
The subject component is used to represent the boundary of the system of interest.
Use-Case Package
We use the model component in order to structure the use case model to make simpler the analysis,
planning, navigation, and communication. Suppose there are various actors or use cases. In that case,
we can also use use-case packages in order to further structure the use-case model in much the similar
way we use directories or folders to organize the information on our hard-disk.
For various reasons, we divide the use-case model into the use-case packages, containing:
Generalizations
Generalizations mean the association between the actors in order to help re-use of common properties.
Dependencies
In UML, various types of dependencies are defined between use cases. In particular, <<include>> and
<<extend>>.
ADVERTISEMENT
We use <<include>> dependency to comprise shared behavior from an included use case into a base
use case to use common behavior.
We use <<extend>> dependency to include optional behavior from an extended use-case into an
extended use case.
If we want to draw a use case diagram in UML first, we must study the complete system appropriately.
We need to find out every function which is offered by the system. When we find out all the system's
functionalities then we convert these functionalities into a number of use cases, and we use these use-
cases in the use case diagram.
A use case means essential functionality of any working system. When we organize the use cases, then
next we need to enlist the numerous actors or things that will collaborate with the system. These actors
are used to implement the functionality of a system. Actors can be someone or something. It can
likewise be a private system's entity. The actors should be pertinent to the functionality or a system in
which the actors are interacting.
When we enlist the use cases and actors, then next, we need to find the relationship of a specific actor
with the system or a use case. An actor should find the total number of ways in order to cooperate with
the system. One actor can interact with the numerous use cases simultaneously, or it may interact with
the multiple-use cases concurrently.
We have to follow the following rules while drawing use-case for any framework:
o The use case name and actor name should be meaningful and related to the system.
o The actor's interaction with the use case should be well-described and in a comprehensible manner.
o Use annotations wherever they are essential.
o If the actor or use case has many relationships, then display only important interactions.
When to Use a Use-Case Diagram?
The use-case diagram is an extraordinary system's functionality that is accomplished by a client. The
objective of use-case diagram is to capture the system's key functionalities and visualize the interactions
of different thinkings known as actors with the use case. It is the basic use of use-case diagram.
With the help of the use-case diagram, we can characterize the system's main part and flow of work
among them. In the use-case, the implementation of details is hidden from external use, and only the
flow of the event is represented.
Using use-case diagrams, we can detect the pre-and post-conditions after communication with the actor.
We can determine these conditions using several test cases.
Use cases are planned to convey wanted functionality so that the exact scope of use case can differ
based on the system and the purpose of making the UML model.
o It must be complete.
o It must be simple.
o The use-case diagram must show each and every interaction with the use case.
o It is must that the use-case should be generalized if it is large.
o At least one system module must be defined in the use case diagram.
o When there are number of actors or use-cases in the use-case diagram, only the significant use-cases
must be represented.
o The use-case diagrams must be clear and easy so that anyone can understand them easily.
Use Cases have been broadly used over the last few years. There are various benefits of the use-case
diagram:
o Use-case diagram provides an outline related to all components in the system. Use-case diagram
helps to define the role of administrators, users, etc.
o The use-Case diagram helps to provide solutions and answers to various questions that may pop up
if you begin a project unplanned.
o It helps us to define the needs of the users extensively and explore how it will work.
System
With the help of the rectangle, we can draw the boundaries of the system, which includes use-cases.
We need to put the actors outside the system's boundaries.
Use-Case
With the help of the Ovals, we can draw the use-cases. With the verb we have to label the ovals in order
to represent the functions of the system.
Actors
Actors mean the system's users. If one system is the actor of the other system, then with the actor
stereotype, we have to tag the actor system.
Relationships
With the simple line we can represent relationships between an actor and use cases. For relationships
between use-case, we use arrows which are labeled either "extends" or "uses". The "extends"
relationship shows the alternative options under the specific use case. The "uses" relationship shows
that single use-case is required to accomplish a job.
ADVERTISEMENT
With regards to examine the system's requirements, use-case diagrams are another one to one. Use-
cases are simple to understand and visual. The following are some guidelines that help you to make
better use cases that are appreciated by your customers and peers the same.
Generally, the use-case diagram contains use-cases, relationships, and actors. Systems and boundaries
may be included in the complex larger diagrams. We'll talk about the guidelines of the use-case diagram
on the basis of the objects.
Do not forget that these are the use case diagram's guidelines, not rules of the use-case diagram.
Actors
Use-Cases
Systems/Packages
Class diagrams
Class diagrams are a type of UML (Unified Modeling Language) diagram used in software
engineering to visually represent the structure and relationships of classes in a system. UML is
a standardized modeling language that helps in designing and documenting software systems.
They are an integral part of the software development process, helping in both the design and
documentation phases.
In these diagrams, classes are depicted as boxes, each containing three compartments for the
class name, attributes, and methods. Lines connecting classes illustrate associations, showing
relationships such as one-to-one or one-to-many.
What is a class?
Class notation is a graphical representation used to depict classes and their relationships in
object-oriented modeling.
1. Class Name:
• The name of the class is typically written in the top compartment of the class box and is
centered and bold.
2. Attributes:
• Attributes, also known as properties or fields, represent the data members of the class. They
are listed in the second compartment of the class box and often include the visibility (e.g.,
public, private) and the data type of each attribute.
3. Methods:
• Methods, also known as functions or operations, represent the behavior or functionality of the
class. They are listed in the third compartment of the class box and include the visibility (e.g.,
public, private), return type, and parameters of each method.
4. Visibility Notation:
• Visibility notations indicate the access level of attributes and methods. Common visibility
notations include:
• + for public (visible to all classes)
• - for private (visible only within the class)
• # for protected (visible to subclasses)
• ~ for package or default visibility (visible to classes in the same package)
Parameter Directionality
In class diagrams, parameter directionality refers to the indication of the flow of information
between classes through method parameters. It helps to specify whether a parameter is an input,
an output, or both. This information is crucial for understanding how data is passed between
objects during method calls.
There are three main parameter directionality notations used in class diagrams:
• In (Input):
•An input parameter is a parameter passed from the calling object (client) to the called
object (server) during a method invocation.
•It is represented by an arrow pointing towards the receiving class (the class that owns the
method).
• Out (Output):
•An output parameter is a parameter passed from the called object (server) back to the
calling object (client) after the method execution.
•It is represented by an arrow pointing away from the receiving class.
• InOut (Input and Output):
•An InOut parameter serves as both input and output. It carries information from the
calling object to the called object and vice versa.
•It is represented by an arrow pointing towards and away from the receiving class.
Relationships between classes
In class diagrams, relationships between classes describe how classes are connected or interact
with each other within a system. There are several types of relationships in object-oriented
modeling, each serving a specific purpose. Here are some common types of relationships in
class diagrams:
1. Association
An association represents a bi-directional relationship between two classes. It indicates that
instances of one class are connected to instances of another class. Associations are typically
depicted as a solid line connecting the classes, with optional arrows indicating the direction of
the relationship.
Let’s understand association using an example:
Let’s consider a simple system for managing a library. In this system, we have two main
entities: Book and Library. Each Library contains multiple Books, and each Book belongs to a
specific Library. This relationship between Library and Book represents an association.
The “Library” class can be considered the source class because it contains a reference to
multiple instances of the “Book” class. The “Book” class would be considered the target class
because it belongs to a specific library.
2. Directed Association
A directed association in a UML class diagram represents a relationship between two classes
where the association has a direction, indicating that one class is associated with another in a
specific way.
• In a directed association, an arrowhead is added to the association line to indicate the
direction of the relationship. The arrow points from the class that initiates the association to the
class that is being targeted or affected by the association.
• Directed associations are used when the association has a specific flow or directionality, such
as indicating which class is responsible for initiating the association or which class has a
dependency on another.
Consider a scenario where a “Teacher” class is associated with a “Course” class in a university
system. The directed association arrow may point from the “Teacher” class to the “Course”
class, indicating that a teacher is associated with or teaches a specific course.
• The source class is the “Teacher” class. The “Teacher” class initiates the association by
teaching a specific course.
• The target class is the “Course” class. The “Course” class is affected by the association as it is
being taught by a specific teacher.
3. Aggregation
Aggregation is a specialized form of association that represents a “whole-part” relationship. It
denotes a stronger relationship where one class (the whole) contains or is composed of another
class (the part). Aggregation is represented by a diamond shape on the side of the whole class.
In this kind of relationship, the child class can exist independently of its parent class.
Let’s understand aggregation using an example:
The company can be considered as the whole, while the employees are the parts. Employees
belong to the company, and the company can have multiple employees. However, if the
company ceases to exist, the employees can still exist independently.
4. Composition
Composition is a stronger form of aggregation, indicating a more significant ownership or
dependency relationship. In composition, the part class cannot exist independently of the whole
class. Composition is represented by a filled diamond shape on the side of the whole class.
Let’s understand Composition using an example:
Imagine a digital contact book application. The contact book is the whole, and each contact
entry is a part. Each contact entry is fully owned and managed by the contact book. If the
contact book is deleted or destroyed, all associated contact entries are also removed.
This illustrates composition because the existence of the contact entries depends entirely on the
presence of the contact book. Without the contact book, the individual contact entries lose their
meaning and cannot exist on their own.
5. Generalization(Inheritance)
Inheritance represents an “is-a” relationship between classes, where one class (the subclass or
child) inherits the properties and behaviors of another class (the superclass or parent).
Inheritance is depicted by a solid line with a closed, hollow arrowhead pointing from the
subclass to the superclass.
In the example of bank accounts, we can use generalization to represent different types of
accounts such as current accounts, savings accounts, and credit accounts.
The Bank Account class serves as the generalized representation of all types of bank accounts,
while the subclasses (Current Account, Savings Account, Credit Account) represent specialized
versions that inherit and extend the functionality of the base class.
7. Dependency Relationship
A dependency exists between two classes when one class relies on another, but the relationship
is not as strong as association or inheritance. It represents a more loosely coupled connection
between classes. Dependencies are often depicted as a dashed arrow.
Let’s consider a scenario where a Person depends on a Book.
• Person Class: Represents an individual who reads a book. The Person class depends on the
Book class to access and read the content.
• Book Class: Represents a book that contains content to be read by a person. The Book class
is independent and can exist without the Person class.
The Person class depends on the Book class because it requires access to a book to read its
content. However, the Book class does not depend on the Person class; it can exist
independently and does not rely on the Person class for its functionality.
8. Usage(Dependency) Relationship
A usage dependency relationship in a UML class diagram indicates that one class (the client)
utilizes or depends on another class (the supplier) to perform certain tasks or access certain
functionality. The client class relies on the services provided by the supplier class but does not
own or create instances of it.
• Usage dependencies represent a form of dependency where one class depends on another
class to fulfill a specific need or requirement.
• The client class requires access to specific features or services provided by the supplier class.
• In UML class diagrams, usage dependencies are typically represented by a dashed arrowed
line pointing from the client class to the supplier class.
• The arrow indicates the direction of the dependency, showing that the client class depends on
the services provided by the supplier class.
Consider a scenario where a “Car” class depends on a “FuelTank” class to manage fuel
consumption.
• The “Car” class may need to access methods or attributes of the “FuelTank” class to check the
fuel level, refill fuel, or monitor fuel consumption.
• In this case, the “Car” class has a usage dependency on the “FuelTank” class because it
utilizes its services to perform certain tasks related to fuel management.
Interaction Diagrams
From the term Interaction, it is clear that the diagram is used to describe some type of
interactions among the different elements in the model. This interaction is a part of dynamic
behavior of the system.
The purpose of interaction diagrams is to visualize the interactive behavior of the system.
Visualizing the interaction is a difficult task. Hence, the solution is to use different types of
models to capture the different aspects of the interaction.
Sequence and collaboration diagrams are used to capture the dynamic nature but from a
different angle.
As we have already discussed, the purpose of interaction diagrams is to capture the dynamic
aspect of a system. So to capture the dynamic aspect, we need to understand what a dynamic
aspect is and how it is visualized. Dynamic aspect can be defined as the snapshot of the
running system at a particular moment
We have two types of interaction diagrams in UML. One is the sequence diagram and the
other is the collaboration diagram. The sequence diagram captures the time sequence of the
message flow from one object to another and the collaboration diagram describes the
organization of objects in a system taking part in the message flow.
Following things are to be identified clearly before drawing the interaction diagram
Following are two interaction diagrams modeling the order management system. The first
diagram is a sequence diagram and the second is a collaboration diagram
The sequence diagram has four objects (Customer, Order, SpecialOrder and NormalOrder).
The following diagram shows the message sequence for SpecialOrder object and the same
can be used in case of NormalOrder object. It is important to understand the time sequence
of message flows. The message flow is nothing but a method call of an object.
The first call is sendOrder () which is a method of Order object. The next call is confirm
() which is a method of SpecialOrder object and the last call is Dispatch () which is a
method of SpecialOrder object. The following diagram mainly describes the method calls
from one object to another, and this is also the actual scenario when the system is running.
The second interaction diagram is the collaboration diagram. It shows the object
organization as seen in the following diagram. In the collaboration diagram, the method call
sequence is indicated by some numbering technique. The number indicates how the
methods are called one after another. We have taken the same order management system to
describe the collaboration diagram.
Method calls are similar to that of a sequence diagram. However, difference being the
sequence diagram does not describe the object organization, whereas the collaboration
diagram shows the object organization.
To choose between these two diagrams, emphasis is placed on the type of requirement. If
the time sequence is important, then the sequence diagram is used. If organization is
required, then collaboration diagram is used.
We have already discussed that interaction diagrams are used to describe the dynamic nature
of a system. Now, we will look into the practical scenarios where these diagrams are used.
To understand the practical application, we need to understand the basic nature of sequence
and collaboration diagram.
The main purpose of both the diagrams are similar as they are used to capture the dynamic
behavior of a system. However, the specific purpose is more important to clarify and
understand.
Sequence diagrams are used to capture the order of messages flowing from one object to
another. Collaboration diagrams are used to describe the structural organization of the
objects taking part in the interaction. A single diagram is not sufficient to describe the
dynamic aspect of an entire system, so a set of diagrams are used to capture it as a whole.
Interaction diagrams are used when we want to understand the message flow and the
structural organization. Message flow means the sequence of control flow from one object
to another. Structural organization means the visual organization of the elements in a
system.
Activity Diagrams
Activity Diagrams are used to illustrate the flow of control in a system and refer to the steps
involved in the execution of a use case. It is a type of behavioral diagram and we can depict
both sequential processing and concurrent processing of activities using an activity diagram ie
an activity diagram focuses on the condition of flow and the sequence in which it happens.
• An activity diagram portrays the control flow from a start point to a finish point showing the
various decision paths that exist while the activity is being executed.
• They are used in business and process modeling where their primary use is to depict the
dynamic aspects of a system.
Activity Diagram Notations
In activity diagrams, the notations are like visual symbols that help represent different elements
and actions in a simple way.
2.1. Initial State
The starting state before an activity takes place is depicted using the initial state.
A process can have only one initial state unless we are depicting nested activities. We use a
black filled circle to depict the initial state of a system. For objects, this is the state when they
are instantiated. The Initial State from the UML Activity Diagram marks the entry point and
the initial Activity State.
For example:
Here the initial state of the system before the application is opened.
Action or Activity State
An activity represents execution of an action on objects or by objects. We represent an activity
using a rectangle with rounded corners. Basically any action or event that takes place is
represented using an activity.
For example: Consider the previous example of opening an application, opening the
application is an activity state in the activity diagram.
For example:
We apply the conditions on input number to display the result :
• If number is odd then display the number.
• If number if even then display the error.
Guard
A Guard refers to a statement written next to a decision node on an arrow sometimes within
square brackets.
The statement must be true for the control to shift along a particular direction. Guards help us
know the constraints and conditions which determine the flow of a process.
Fork
Fork nodes are used to support concurrent activities. When we use a fork node when both the
activities get executed concurrently i.e. no decision is made before splitting the activity into
two parts. Both parts need to be executed in case of a fork statement. We use a rounded solid
rectangular bar to represent a Fork notation with incoming arrow from the parent activity state
and outgoing arrows towards the newly created activities.
For example:
In the example below, the activity of making coffee can be split into two concurrent activities
and hence we use the fork notation.
Join
Join nodes are used to support concurrent activities converging into one. For join notations we
have two or more incoming edges and one outgoing edge.
For example:
When both activities i.e. steaming the milk and adding coffee get completed, we converge them
into one final activity.
Swimlanes
We use Swimlanes for grouping related activities in one column. Swimlanes group related
activities into one column or one row. Swimlanes can be vertical and horizontal. Swimlanes
are used to add modularity to the activity diagram. It is not mandatory to use swimlanes. They
usually give more clarity to the activity diagram. It’s similar to creating a function in a program.
It’s not mandatory to do so, but, it is a recommended practice.
For example:
Let us assume that the processing of an image takes a lot of time. Then it can be represented as
shown below.
Below are the steps of how to draw the Activity Diagram in UML:
Step 1. Identify the Initial State and Final States:
• This is like setting the starting point and ending point of a journey.
• Identify where your process begins (initial state) and where it concludes (final states).
• For example, if you are modelling a process for making a cup of tea, the initial state
could be “No tea prepared,” and the final state could be “Tea ready.”
Step 2. Identify the Intermediate Activities Needed:
• Think of the steps or actions required to go from the starting point to the ending point.
• These are the activities or tasks that need to be performed.
• Continuing with the tea-making , intermediate activities could include “Boil water,”
“Pour tea into a cup”.
Step 3. Identify the Conditions or Constraints:
• Consider the conditions or circumstances that might influence the flow of your process.
• These are the factors that determine when you move from one activity to another.
• Using the tea-making scenario, a condition could be “Water is boiled,” which triggers
the transition to the next activity.
Step 4. Draw the Diagram with Appropriate Notations:
• Now, represent the identified states, activities, and conditions visually using the
appropriate symbols and notations in an activity diagram. This diagram serves as a visual
map of your process, showing the flow from one state to another.
Functional modelling
In the Functional Model, software converts information. and to accomplish this, it must
perform at least three common tasks- input, processing and output. When functional models
of an application are created, the software engineer emphasizes problem specific tasks. The
functional model begins with a single reference level model (i.e., be manufactured). In a
series of iterations, more and more functional detail is given, until all system functionality is
fully represented.
Information is converted because it flows from a computer-based system. The system takes
input in various forms; Hardware, software, and human elements are applied to replace it;
And produces in various forms. The transformation (s) or function may be composed of a
single logical comparison, a complex numerical method, or a rule- the invention approach of
an expert system. The output can light an LED or provide a 200 page report. Instead, we can
create a model or flow model for any computer- based system, regardless of size and
complexity.
Structural analysis started as an Information Flow Modelling technique. A computer-based
system can be modeled as an information transform function as shown in figure.
A rectangle represents an external unit. That is, a system element, such as a hardware, a
person or another system that provides information for transformation by the software or
receives information provided by the software. A circle is used to represent a process or
transform or a function that is applied to data and changes it in some way. An arrow is used to
represent one or more data items.
All arrows should be labeled in a DFD. The double line is used to represent data store. There
may be implicit procedure or sequence in the diagram but explicit logical details are generally
delayed until software design.
Characteristics of DFD
• DFDs are commonly used during problem analysis.
• DFDs are quite general and are not limited to problem analysis for software requirements
specification.
• DFDs are very useful in understanding a system and can be effectively used during analysis.
• It views a system as a function that transforms the inputs into desired outputs.
• The DFD aims to capture the transformations that take place within a system to the input data
so that eventually the output data is produced.
• The processes are shown by named circles and data flows are represented by named arrows
entering or leaving the bubbles.
• A rectangle represents a source or sink and it is a net originator or consumer of data. A source
sink is typically outside the main system of study.
Components of DFD
The Data Flow Diagram has 4 components:
• Process Input to output transformation in a system takes place because of process function.
The symbols of a process are rectangular with rounded corners, oval, rectangle or a circle. The
process is named a short sentence, in one word or a phrase to express its essence
• Data Flow Data flow describes the information transferring between different parts of the
systems. The arrow symbol is the symbol of data flow. A relatable name should be given to the
flow to determine the information which is being moved. Data flow also represents material
along with information that is being moved. Material shifts are modeled in systems that are not
merely informative. A given flow should only transfer a single type of information. The
direction of flow is represented by the arrow which can also be bi-directional.
• Warehouse The data is stored in the warehouse for later use. Two horizontal lines represent
the symbol of the store. The warehouse is simply not restricted to being a data file rather it can
be anything like a folder with documents, an optical disc, a filing cabinet. The data warehouse
can be viewed independent of its implementation. When the data flow from the warehouse it is
considered as data reading and when data flows to the warehouse it is called data entry or data
updating.
• Terminator The Terminator is an external entity that stands outside of the system and
communicates with the system. It can be, for example, organizations like banks, groups of
people like customers or different departments of the same organization, which is not a part of
the model system and is an external entity. Modeled systems also communicate with terminator.
4. Central Repository: It provides a single point of storage for data diagrams, reports, and
documents related to project management.
5. Documentation Generators: It helps in generating user and technical documentation as per
standards. It creates documents for technical users and end users.
For example, Doxygen, DrExplain, Adobe RoboHelp for documentation.
6. Code Generators: It aids in the auto-generation of code, including definitions, with the help
of designs, documents, and diagrams.
7. Tools for Requirement Management: It makes gathering, evaluating, and managing
software needs easier.
8. Tools for Analysis and Design: It offers instruments for modelling system architecture and
behaviour, which helps throughout the analysis and design stages of software development.
9. Tools for Database Management: It facilitates database construction, design, and
administration.
10. Tools for Documentation: It makes the process of creating, organizing, and maintaining
project documentation easier.
Advantages of the CASE approach:
• Improved Documentation: Comprehensive documentation creation and maintenance is
made easier by CASE tools. Since automatically generated documentation is usually more
accurate and up to date, there are fewer opportunities for errors and misunderstandings brought
on by out-of-current material.
• Reusing Components: Reusable component creation and maintenance are frequently
facilitated by CASE tools. This encourages a development approach that is modular and
component-based, enabling teams to shorten development times and reuse tested solutions.
• Quicker Cycles of Development: Development cycles take less time when certain jobs, such
testing and code generation, are automated. This may result in software solutions being
delivered more quickly, meeting deadlines and keeping up with changing business
requirements.
• Improved Results: Code generation, documentation, and testing are just a few of the time-
consuming, repetitive operations that CASE tools perform. Due to this automation, engineers
are able to concentrate on more intricate and imaginative facets of software development, which
boosts output.
• Achieving uniformity and standardization: Coding conventions, documentation
formats and design patterns are just a few of the areas of software development where CASE
tools enforce uniformity and standards. This guarantees consistent and maintainable software
development.
Disadvantages of the CASE approach:
• Cost: Using a case tool is very costly. Most firms engaged in software development on a
small scale do not invest in CASE tools because they think that the benefit of CASE is
justifiable only in the development of large systems.
• Learning Curve: In most cases, programmers’ productivity may fall in the initial phase of
implementation, because users need time to learn the technology. Many consultants offer
training and on-site services that can be important to accelerate the learning curve and to the
development and use of the CASE tools.
• Tool Mix: It is important to build an appropriate selection tool mix to urge cost advantage
CASE integration and data integration across all platforms is extremely important.
Finaly software development world, computer-aided software engineering is a vital tool that
enables teams to produce high-quality software quickly and cooperatively. CASE tools will
probably become more and more essential as technology develops in order to satisfy the
demands of complicated software development projects.