Professional Documents
Culture Documents
IT 118 - SIA - Module 4
IT 118 - SIA - Module 4
Module 4
Modeling Requirements
Modeling requirements (or requirements modeling) is the process used in software development
projects where requirements and solutions constantly evolve through collaborative efforts and
teamwork. In any IT project, there is always a possibility that developers could misinterpret software
requirements. Most commonly, this will be due to a lack of effective communication and briefing. This
can result in discrepancies in the software that is being built.
To mitigate any potential risks, employees and teams should create more detailed visualization
processes. This will help ensure that the project’s exact requirements are documented clearly. By doing
so, you can create a strong foundation for the project’s overall needs and specifications. Thus, affording
you a higher-level of understanding. By using this method of cross-functional and self-organizing teams,
you can ensure that your team meets the exact needs of the stakeholders.
The main aim of requirements modeling is to support the end goals of system or software development.
It also aims to achieve these objectives:
• Identify and establish the best practices required to create an effective model
• Outline the ways you intend to put said practices into action
• Always have alternatives to improve the overall modeling approach
By using this process, you will enhance the overall clarity of your requirements. This can drastically
improve the outcomes of your software projects. Below are the main benefits of using modern
requirements modeling and management systems:
UML uses mostly graphical notations to express the design of software projects. Using the UML helps
project teams communicate, explore potential designs, and validate the architectural design of the
software. In this article, we will give you detailed ideas about what is UML, the history of UML and a
description of each UML diagram type, along with UML examples.
As the strategic value of software increases for many companies, the industry looks for techniques to
automate the production of software and to improve quality and reduce cost and time-to-market. These
techniques include component technology, visual programming, patterns and frameworks. Businesses
also seek techniques to manage the complexity of systems as they increase in scope and scale. In
particular, they recognize the need to solve recurring architectural problems, such as physical
distribution, concurrency, replication, security, load balancing and fault tolerance. Additionally, the
development for the World Wide Web, while making some things simpler, has exacerbated these
architectural problems. The Unified Modeling Language (UML) was designed to respond to these
needs. The primary goals in the design of the UML summarize by Page-Jones in Fundamental Object-
Oriented Design in UML as follows:
1. Provide users with a ready-to-use, expressive visual modeling language so they can develop
and exchange meaningful models.
2. Provide extensibility and specialization mechanisms to extend the core concepts.
3. Be independent of particular programming languages and development processes.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of the OO tools market.
6. Support higher-level development concepts such as collaborations, frameworks, patterns and
components.
7. Integrate best practices.
The first thing to notice about the UML is that there are a lot of different diagrams (models) to get used
to. The reason for this is that it is possible to look at a system from many different viewpoints. A software
development will have many stakeholders playing a part.
For Example:
• Analysts
• Designers
• Coders
• Testers
• QA
• The Customer
• Technical Authors
All of these people are interested in different aspects of the system, and each of them require a different
level of detail. For example, a coder needs to understand the design of the system and be able to
convert the design to a low level code. By contrast, a technical writer is interested in the behavior of
the system as a whole, and needs to understand how the product functions. The UML attempts to
provide a language so expressive that all stakeholders can benefit from at least one UML diagram.
Structure diagrams show the static structure of the system and its parts on different abstraction and
implementation levels and how they are related to each other. The elements in a structure diagram
represent the meaningful concepts of a system, and may include abstract, real world and
implementation concepts, there are seven types of structure diagram as follows:
1. Class Diagram
2. Component Diagram
3. Deployment Diagram
4. Object Diagram
5. Package Diagram
6. Composite Structure Diagram
7. Profile Diagram
Behavior diagrams show the dynamic behavior of the objects in a system, which can be described as
a series of changes to the system over time, there are seven types of behavior diagrams as follows:
7. Timing Diagram
Let have a brief discussion with UML Diagrams starting with Structure diagrams.
1. Class Diagram
The class diagram is a central modeling technique that runs through nearly all object-oriented methods.
This diagram describes the types of objects in the system and various kinds of static relationships which
exist between them.
Relationships
• Association - represent relationships between instances of types (a person works for a company,
a company has a number of offices.
• Inheritance - the most obvious addition to ER diagrams for use in OO. It has an immediate
correspondence to inheritance in OO design.
• Aggregation - Aggregation, a form of object composition in object-oriented design.
2. Component Diagram
In the Unified Modeling Language, a component diagram depicts how components are wired together
to form larger components or software systems. It illustrates the architectures of the software
components and the dependencies between them. Those software components including run-time
components, executable components also the source code components.
3. Deployment Diagram
The Deployment Diagram helps to model the physical aspect of an Object-Oriented software system.
It is a structure diagram which shows architecture of the system as deployment (distribution) of software
artifacts to deployment targets. Artifacts represent concrete elements in the physical world that are the
result of a development process. It models the run-time configuration in a static view and visualizes the
distribution of artifacts in an application. In most cases, it involves modeling the hardware configurations
together with the software components that lived on.
4. Object Diagram
An object diagram is a graph of instances, including objects and data values. A static object diagram
is an instance of a class diagram; it shows a snapshot of the detailed state of a system at a point in
time. The difference is that a class diagram represents an abstract model consisting of classes and
their relationships. However, an object diagram represents an instance at a particular moment, which
is concrete in nature. The use of object diagrams is fairly limited, namely to show examples of data
structure.
Some people may find it difficult to understand the difference between a UML Class Diagram and a
UML Object Diagram as they both comprise of named "rectangle blocks", with attributes in them, and
with linkages in between, which make the two UML diagrams look similar. Some people may even
think they are the same because in the UML tool they use both the notations for Class Diagram and
Object Diagram are put inside the same diagram editor - Class Diagram. But in fact, Class Diagram
and Object Diagram represent two different aspects of a code base.
You create "classes" when you are programming. For example, in an online banking system you may
create classes like 'User', 'Account', 'Transaction', etc. In a classroom management system you may
create classes like 'Teacher', 'Student', 'Assignment', etc. In each class, there are attributes and
operations that represent the characteristic and behavior of the class. Class Diagram is a UML
diagram where you can visualize those classes, along with their attributes, operations and the inter-
relationship.
UML Object Diagram shows how object instances in your system are interacting with each other at a
particular state. It also represents the data values of those objects at that state. In other words, a
UML Object Diagram can be seen as a representation of how classes (drawn in UML Class Diagram)
are utilized at a particular state.
If you are not a fan of those definition stuff, take a look at the following UML diagram examples. I
believe that you will understand their differences in seconds.
The following Class Diagram example represents two classes - User and Attachment. A user can
upload multiple attachment so the two classes are connected with an association, with 0..* as
multiplicity on the Attachment side.
The following Object Diagram example shows you how the object instances of User and Attachment
class "look like" at the moment Peter (i.e. the user) is trying to upload two attachments. So there are
two Instance Specification for the two attachment objects to be uploaded.
5. Package Diagram
Package diagram is UML structure diagram which shows packages and dependencies between the
packages. Model diagrams allow to show different views of a system, for example, as multi-layered
(aka multi-tiered) application - multi-layered application model.
Composite Structure Diagram is one of the new artifacts added to UML 2.0. A composite structure
diagram is similar to a class diagram and is a kind of component diagram mainly used in modeling a
system at micro point-of-view, but it depicts individual parts instead of whole classes. It is a type of
static structure diagram that shows the internal structure of a class and the collaborations that this
structure makes possible.
This diagram can include internal parts, ports through which the parts interact with each other or
through which instances of the class interact with the parts and with the outside world, and
connectors between parts or ports. A composite structure is a set of interconnected elements that
collaborate at runtime to achieve some purpose. Each element has some defined role in the
collaboration.
7. Profile Diagram
A profile diagram enables you to create domain and platform specific stereotypes and define the
relationships between them. You can create stereotypes by drawing stereotype shapes and relate
them with composition or generalization through the resource-centric interface. You can also define
and visualize tagged values of stereotypes.
A use-case model describes a system's functional requirements in terms of use cases. It is a model of
the system's intended functionality (use cases) and its environment (actors). Use cases enable you to
relate what you need from a system to how the system delivers on those needs.
Think of a use-case model as a menu, much like the menu you'd find in a restaurant. By looking at the
menu, you know what's available to you, the individual dishes as well as their prices. You also know
what kind of cuisine the restaurant serves: Italian, Mexican, Chinese, and so on. By looking at the
menu, you get an overall impression of the dining experience that awaits you in that restaurant. The
menu, in effect, "models" the restaurant's behavior.
Because it is a very powerful planning instrument, the use-case model is generally used in all phases
of the development cycle by all team members.
2. Activity Diagram
Activity diagrams are graphical representations of workflows of stepwise activities and actions with
support for choice, iteration and concurrency. It describes the flow of control of the target system,
such as the exploring complex business rules and operations, describing the use case also the
business process. In the Unified Modeling Language, activity diagrams are intended to model both
computational and organizational processes (i.e. workflows).
A state diagram is a type of diagram used in UML to describe the behavior of systems which is based
on the concept of state diagrams by David Harel. State diagrams depict the permitted states and
transitions as well as the events that effect these transitions. It helps to visualize the entire lifecycle of
objects and thus help to provide a better understanding of state-based systems.
4. Sequence Diagram
The Sequence Diagram models the collaboration of objects based on a time sequence. It shows how
the objects interact with others in a particular scenario of a use case. With the advanced visual
modeling capability, you can create complex sequence diagram in few clicks. Besides, some
modeling tool such as Visual Paradigm can generate sequence diagram from the flow of events
which you have defined in the use case description.
5. Communication Diagram
Similar to Sequence Diagram, the Communication Diagram is also used to model the dynamic
behavior of the use case. When compare to Sequence Diagram, the Communication Diagram is more
focused on showing the collaboration of objects rather than the time sequence. They are actually
semantically equivalent, so some of the modeling tool such as, Visual Paradigm allows you to
generate it from one to the other.
The Interaction Overview Diagram focuses on the overview of the flow of control of the interactions. It
is a variant of the Activity Diagram where the nodes are the interactions or interaction occurrences. The
Interaction Overview Diagram describes the interactions where messages and lifelines are hidden. You
can link up the "real" diagrams and achieve high degree navigability between diagrams inside the
Interaction Overview Diagram.
7. Timing Diagram
Timing Diagram shows the behavior of the object(s) in a given period of time. Timing diagram is a
special form of a sequence diagram. The differences between timing diagram and sequence diagram
are the axes are reversed so that the time are increase from left to right and the lifelines are shown in
separate compartments arranged vertically.
You now have an idea of what are the different types of UML diagrams. Let us now take a deeper look
on one of the most useful types of diagrams in UML which is the Class Diagram. Class Diagrams clearly
map out the structure of a particular system by modeling its classes, attributes, operations, and
relationships between objects.
What is a Class?
A description of a group of objects all with similar roles in the system, which consists of:
Class Notation
1. Class Name
• The name of the class appears in the first partition.
2. Class Attributes
• Attributes are shown in the second partition.
• The attribute type is shown after the colon.
• Attributes map onto member variables (data members) in code.
3. Class Operations (Methods)
• Operations are shown in the third partition. They are services the class provides.
• The return type of a method is shown after the colon at the end of the method signature.
• The return type of method parameters is shown after the colon following the parameter name.
• Operations map onto class methods in code
Class Relationships
A class may be involved in one or more relationships with other classes. A relationship can be one of
the following types:
2. Simple Association
3. Aggregation
4. Composition
A special type of aggregation where parts are destroyed when the whole is destroyed.
5. Dependency
• Exists between two classes if the changes to the definition of one may cause changes to the
other (but not the other way around).
Relationship Names
Relationship - Roles
Navigability
The arrows indicate whether, given one instance participating in a relationship, it is possible to
determine the instances of the other class that are related to it.
• Given a spreadsheet, we can locate all of the cells that it contains, but that
o we cannot determine from a cell in what spreadsheet it is contained.
• Given a cell, we can obtain the related expression and value, but
o given a value (or expression) we cannot find the cell of which those are attributes.
In object-oriented design, there is a notation of visibility for attributes and operations. UML identifies
four types of visibility: public, protected, private, and package.
The +, -, # and ~ symbols before an attribute and operation name in a class denote the visibility of the
attribute and operation.
Multiplicity
How many objects of each class take part in the relationships and multiplicity can be expressed as:
• Exactly one - 1
• Zero or one - 0..1
• Many - 0..* or *
• One or more - 1..*
• Exact Number - e.g. 3..4 or 6
• Or a complex relationship - e.g. 0..1, 3..4, 6.* would mean any number of objects other than 2
or 5
Multiplicity Example
• Requirement: A Student can take many Courses and many Students can be enrolled in one
Course.
• In the example below, the class diagram (on the left), describes the statement of the
requirement above for the static model while the object diagram (on the right) shows the
snapshot (an instance of the class diagram) of the course enrollment for the courses Software
Engineering and Database Management respectively)
Inevitably, if you are modeling a large system or a large business area, there will be numerous
entities you must consider. Should we use multiple or a single class diagram for modeling the
problem? The answer is:
• Instead of modeling every entity and its relationships on a single class diagram, it is better to
use multiple class diagrams.
• Dividing a system into multiple class diagrams makes the system easier to understand,
especially if each diagram is a graphical representation of a specific part of the system.
We can use class diagrams in different development phases of a software development lifecycle and
typically by modeling class diagrams in three different perspectives (levels of detail) progressively as
we move forward:
• Conceptual perspective: The diagrams are interpreted as describing things in the real world.
Thus, if you take the conceptual perspective you draw a diagram that represents the concepts
in the domain under study. These concepts will naturally relate to the classes that implement
them. The conceptual perspective is considered language-independent.
• Specification perspective: The diagrams are interpreted as describing software abstractions or
components with specifications and interfaces but with no commitment to a particular
implementation. Thus, if you take the specification perspective we are looking at the interfaces
of the software, not the implementation.
• Implementation perspective: The diagrams are interpreted as describing software
implementations in a particular technology and language. Thus, if you take the implementation
perspective we are looking at the software implementation.
Now, let us discuss on of one of the common UML diagrams used in software or system
development, the Use Case Diagram. Use Case diagram captures the functional requirements of the
system. Each use case in a use case diagram represents a high level business goal that yields a
measurable result of business values. (UML) Actors are connected with use cases to represent the
roles that interact with the functions.
system from the end user's perspective. It is an effective technique for communicating system behavior
in the user's terms by specifying all externally visible system behavior.
A use case diagram is usually simple. It does not show the detail of the use cases:
• It only summarizes some of the relationships between use cases, actors, and systems.
• It does not show the order in which steps are performed to achieve the goals of each use case.
As said, a use case diagram should be simple and contains only a few shapes. If yours contain more
than 20 use cases, you are probably misusing use case diagram. Use case diagrams belong to the
family of behavioral diagrams.
These days use case modeling is often associated with UML, although it has been introduced before
UML existed. Its brief history is as follow:
• In 1986, Ivar Jacobson first formulated textual and visual modeling techniques for specifying use
cases.
• In 1992 his co-authored book Object-Oriented Software Engineering - A Use Case Driven
Approach helped to popularize the technique for capturing functional requirements, especially in
software development.
Use case diagrams are typically developed in the early stage of development and people often apply
use case modeling for the following purposes:
A standard form of use case diagram is defined in the Unified Modeling Language as shown in the Use
Case Diagram example below:
1. Actor
2. Use Case
3. Communication Link
• The participation of an actor in a use case is shown by connecting an actor to a use case by a
solid link.
• Actors may be connected to use cases by associations, indicating that the actor and the use
case communicate with one another using messages.
4. Boundary of system
Use cases share different kinds of relationships. Defining the relationship between two use cases is
the decision of the software analysts of the use case diagram. A relationship between two use cases
is basically modeling the dependency between the two use cases. The reuse of an existing use case
by using different types of relationships reduces the overall effort required in developing a system.
Use case relationships are listed as the following:
1. Extends
• Indicates that an "Invalid Password" use case may include (subject to specified in the
extension) the behavior specified by base use case "Login Account".
• Depict with a directed arrow having a dotted line. The tip of arrowhead points to the base use
case and the child use case is connected at the base of the arrow.
• The stereotype "<<extends>>" identifies as an extend relationship
2. Include
• When a use case is depicted as using the functionality of another use case, the relationship
between the use cases is named as include or uses relationship.
• A use case includes the functionality described in another use case as a part of its business
process flow.
• A uses relationship from base use case to child use case indicates that an instance of the base
use case will include the behavior as specified in the child use case.
• An include relationship is depicted with a directed arrow having a dotted line. The tip of
arrowhead points to the child use case and the parent use case connected at the base of the
arrow.
• The stereotype "<<include>>" identifies the relationship as an include relationship.
3. Generalization
Often, people find it easiest to start the requirements elicitation process by identifying the actors. The
following questions can help you identify the actors of your system (Schneider and Winters - 1998):
Identifying the Use Cases, and then the scenario-based elicitation process carries on by asking what
externally visible, observable value that each actor desires. The following questions can be asked to
identify use cases, once your actors have been identified (Schneider and Winters - 1998):
• Does the system store information? What actors will create, read, update or delete this
information?
• Does the system need to notify an actor about changes in the internal state?
• Are there any external events the system must know about? What actor informs the system of
those events?
References
https://reqtest.com/requirements-blog/requirements-modelling/
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-uml/
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-use-case-diagram/