Module3 - Object Oriented Analysis & Functional Model
Module3 - Object Oriented Analysis & Functional Model
Module3 - Object Oriented Analysis & Functional Model
Software Engineering
Computer Science
Academic Year 2023/2024
1
Contents
1. Introduction
• What will we learn
2. Object Oriented Analysis and Design
• OOA/D in the SDLC process
• Functional, Static and Dynamic views vs OOA/D
3. The Unified Modeling Language (UML)
• Views of the modeling
• Diagrams
4. Functional Model
• Use Cases
• UML: Modules 3-6
1. Introduction
1. Introduction
What will we learn?
• Object-Oriented Analysis and Design (OOAD) is a software engineering methodology
that employs object-oriented principles to model and design complex systems.
• We may distinguish modeling activities into the three most essential components or
models: functional, static and dynamic. They are different perspectives on one or
more specific aspects of the system. We will cover the three models over the next
modules: 3 to 6.
• The Unified Modeling Language (UML) is a standardized notation for creating diagrams
that represent different aspects of a software system. OOAD uses UML diagrams to
represent the different components and interactions of a software system.
• Use Cases: are a way of describing the different ways in which users interact with a
software system. OOAD uses use cases to help developers understand the
requirements of a system and to design software that meet those requirements.
1. Introduction
What will we learn?
• Functional model (in this Module 3): basically it focuses on how the system is supposed to
function satisfying the users or stakeholders. It illustrates the activities of the systems, the
transformation and the functionality, while concentrating on the interaction among the
resources, goals and rules in the organization.
• Static model (Module 5): it concerns about the structuring of databases for all kind
information or resources used in the organizational business, and contain all information
about the objects participating in the business. Data models are usually static, because the
entity types do not change during their life cycles. The changes are only objects that
belong to their respective classes.
• Dynamic model (Module 4): it describes the behaviour of the system containing each
important resource and interacts between several different resources. The behaviour
concerns the evolution of objects in the system in terms of the changes they undergo in
response to interaction with other objects inside and outside the system.
1. Introduction
What will we learn?
1. Introduction
What will we learn?
OOA/D
Functional
Use Cases
Model
OOA/D
Dynamic
UML
Model
Static
Model
1. Introduction
• Book References
• The next table shows a summary of the UML diagrams and modeling phase by Modules
of this course
2. Object-Oriented Analysis and Design
Modeling view Diagrams Seminar
Module
Functional Use case diagram Module 3
Activity diagram
Sequence diagram
Design “Design” view, emphasis on collaboration diagrams and the design detail of class Module 6
diagrams. Also introduces component and deployment diagrams.
2. Object-Oriented Analysis and Design
OOA/D in the SDLC process
• In Module 1, we discussed the overall software development process (the general, or macro,
SDLC process).
• The analysis and design process can be understood as a micro process that is part of the
macro SDLC process.
• Specifically, the OOA/D process takes the requirements provided by the SDLC process and
produces design specifications that are implemented, tested, deployed in the SDLC process.
2. Object-Oriented Analysis and Design
• Analysis takes the requirements and produces an initial solution, and Design takes the
results of analysis and produces a specification that can be implemented, tested, deployed.
• Analysis is about understanding the problem to be solved better. Is a critical part of the
overall SDLC process and it will result in a more robust and understandable design, with a
clear separation of concerns and a balanced division of responsibility between elements.
• Analysis focuses on behavior, not form. In analysis, you seek to model the world by
identifying the elements that form the vocabulary of the problem domain and describing
their roles, responsibilities, and collaborations. Rather, analysis must yield a statement of
what the system does, not how it does it.
Analysis Design
2. Object-Oriented Analysis and Design
• In Design, you invent the elements that provide the behavior that the analysis elements
require. You begin the design process as soon as you have some reasonably complete model
of the behavior of the system.
• We also need to understand the separation of concerns when developing the architecture
versus the individual components during analysis and design. Architecture is concerned
with the relationships between the parts of the systems (e.g., components), their
responsibilities, interfaces, and collaboration. In contrast, analysis and design of system
components focus on the internals of those components and how they will satisfy the
requirements.
2. Object-Oriented Analysis and Design
Contents
1. Introduction
• What will we learn
2. Object Oriented Analysis and Design
• OOA/D in the SDLC process
• Functional, Static and Dynamic views vs OOA/D
3. The Unified Modeling Language (UML)
• Views of the modeling
• Diagrams
4. Functional Model
• Use Cases
• UML: Modules 3-6
3. UML
• The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar
Jacobson, and Jim Rumbaugh with contributions from other leading methodologists,
software vendors, and many users. The UML provides the application modeling language
for:
ü Business process modeling/ Requirement Analysis with Use-cases.
ü Static Design with Class and object modeling.
ü Dynamic Design with sequence, collaboration and activity diagrams.
ü Component modeling.
ü Distribution and deployment modeling.
• In 1997 UML was adopted as a standard by the Object Management Group (OMG), and has
been managed by this organization ever since. In 2005 UML was also published by the
International Organization for Standardization (ISO) as an approved ISO standard.
https://www.uml.org/
3. UML
• From the late 1980s to the 1990s, many methods and languages for the representation of
OOP were developed. The result was a variety of methods that were largely dissimilar. To
unify these, these three developers (James Rumbaugh, Grady Booch and Ivar
Jacobson) decided to merge several existing languages into a common, standardized one.
• The three had already created their own OOP development methods: the Booch method,
the object modeling technique (OMT) and the OO software engineering method (OOSE)
• UML should define the semantics for the representation of these methods as the
modeling language. Under the name “UML Partners”, the developers started working on
the completion of UML in a team in 1996. They then handed it over to the Object
Management Group, who introduced the unified modeling language version 1.1 as the
standard in 1997.
• The developers set up a task force to improve the language over several versions. A major
revision was UML 2.0 in 2005.
• UML v 2.5.2 appeared in December 2017.
3. UML
• The Unified modeling language is a standard way to visualize a software system.
• UML has several diagrams defined which are used to show structural, and behavioral
aspects of a software system and those diagrams help:
ü end users to clarify their requirements, understand to the software system
ü and helps software engineer to model, analyze and design software system.
• Teams can work with each other easily as the blue print developed using standard notations
and is easy to understand.
3. UML
• Tools for writing UML: https://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools
https://www.umldesigner.org/overview/
3. UML
• UML diagrams are classified into (see Modules 4-6 to learn more):
• Structural Diagrams (Static): represent individual elements in a system. The static
representation does not represent a change, but rather represents states and dependencies.
ü Component Diagrams
ü Object Diagrams
ü Class Diagrams
ü Deployment Diagrams
ü Package Diagrams
• Behavior Diagrams (Dynamic): represent dynamic processes.
ü Use Case Diagrams
ü State Diagrams
ü Activity Diagrams
ü Interaction Diagrams: Sequence Diagrams, Collaboration Diagrams
3. UML
• UML can be used in different ways and according to their use:
3. UML can also be used in different views when representing all relevant information
about a system’s architecture. You usually need to present multiple views.
• There are different opinions as to what views are required. Krutchen well-known 4+1
view model suggests that there should be four fundamental architectural views, which
are related using use cases or scenarios.
3. UML
• The 4+1 views that he suggests are:
1. A logical view: shows the key abstractions in the system as objects or
object classes. It should be possible to relate the system requirements to
entities in this view.
2. A process view: shows how, at run-time, the system is composed of
interacting processes. This view is useful for making judgments about
nonfunctional system characteristics such as performance and availability.
3. A development view: shows how the software is decomposed for
development, that is, it shows the breakdown of the software into components
that are implemented by a single developer or development team.
4. A physical view, which shows the system hardware and how software
components are distributed across the processors in the system. This view is
useful for systems engineers planning a system deployment.
3. UML
• For example, the Unified Process Model
(UP) method in SDLC (See Module 1) uses
UML in different views when doing the
architectural design (that is concerned
with understanding how a system
should be organized and designing
the overall structure).
https://youtu.be/KY81igoV8W0?si=FoRw0JgQufnoD1h-
Contents
1. Introduction
• What will we learn
2. Object Oriented Analysis and Design
• OOA/D in the SDLC process
• Functional, Static and Dynamic views vs OOA/D
3. The Unified Modeling Language (UML)
• Views of the modeling
• Diagrams
4. Functional Model
• Use Cases
• UML: Modules 3-6
4. Functional Model
4. Functional Model
• We introduced requirements in Module 1 as the first step in the SDLC. Requirements can be
initially still a little fuzzy, and they are all written in the language of the user.
• How do you take this initial loosely defined requirements and distill it into a format for your
designers without losing important detail? UML has some diagram tools to support in this
phase. Specifically, UML use cases.
• A use case is a case (or situation) where your system is used to fulfill one or more of your
user’s requirements; a use case captures a piece of functionality that the system provides.
• Use cases are an excellent starting point for object-oriented system development, design,
testing, and documentation.
• They describe a system’s requirements from the outside looking in; they specify the value
that the system delivers to users. Because use cases are the functional requirements, they
should be the first serious output from your model after a project is started.
• How can you begin to design a system if you don’t know what it will be required to do?
4. Functional Model
• Use cases will influence many aspects of a Project -
including OOA/D- and will be input to many subsequent
artifacts.
• This chapter explores basic concepts, including how to
write use cases and draw a UML use case diagrams. Use
cases are not only diagrams, they are also text.
• The essence is discovering and recording functional
requirements by writing stories of using a system to
fulfill user goals; that is, cases of use. It’s often difficult
to discover what’s needed and write it well.
• The use cases can influence many other analysis, design,
implementation and test artifacts.
4. Functional Model
Requirements Specification and Use Case Model
• Goal: Understand client needs in order to write functional specifications. A use case
model tries to reply three questions:
• Let’s see in more detail how the use case model is done. Module 4 will also dig
deeper on UML Use Cases.
4. Functional Model
Use Case
• A use case captures textually the steps an actor must follow to accomplish a goal.
Use cases must contain, at least:
• Brief: terse one-paragraph summary, usually of the main success scenario. When?
During early requirements analysis, to get a quick sense of subject and scope.
• Casual: informal paragraph format. Paragraphs that cover various Scenarios.
• Fully dressed: all steps and variations are written in detail, and there are
supporting sections, such as preconditions and success guarantees. When? After
many use cases have been identified and written. See an example in the next slide.
4. Functional Model
Use Case section Comment
Use Case Name With a verb.
Scope The system under design.
Level “user-goal” or “subfunction”.
Primary Actor Calls on the system to deliver its services.
Stakeholders and Interests Who cares about this use case, and what do they want?
Preconditions What must be true on start, and worth telling the reader?
• Actor: external entity involved in some of the use cases of the system we are
developing.
ü Can send and/or receive information from the system.
ü It can be a person, a device or a subsystem.
ü Use cases focus on the actor’s goals, not the technology.
ü Proper identification and understanding of actors are crucial for accurately
modeling system behavior.
4. Functional Model
Actors
• Once you have captured an initial set of actors that interact with your system,
you, the next step is to find cases where the system is being used to complete a
specific job for an actor (use cases or scenarios).
• A use case, or job, might be as simple as allowing the user to log in or as
complex as executing a distributed transaction across multiple global databases.
The important thing to remember is that a use case is a complete use of the
system; there is some interaction with the system, as well as some output from
that interaction.
• Remember, if use cases are truly requirements, then they must have very clear
pass/fail criteria. The developer, the tester, the technical writer, and the user
must explicitly know whether the system fulfils the use case or not.
4. Functional Model
Use cases (Scenarios) in UML
• A diagram showing the use cases and actors may be a nice starting point, but
it does not provide enough detail.
• There are no hard and fast rules as to what exactly goes into a use case
description according to UML. See the next example, or the previous slide at
the begining of the section.
4. Functional Model
Use case description detail What the detail means and why it is useful
Related Requirements
Some indication as to which requirements this use case partially or completely fulfills.
Goal In Context The use case’s place within the system and why this use case is important.
Preconditions What needs to happen before the use case can be executed.
Successful End Condition What the system’s condition should be if the use case executes successfully.
Failed End Condition What the system’s condition should be if the use case fails to execute successfully.
Primary Actors The main actors that participate in the use case. Often includes the actors that trigger or
directly receive information from a use case’s execution.
Secondary Actors Actors that participate but are not the main players in a use case’s execution.
Trigger The event triggered by an actor that causes the use case to execute.
Main Flow The place to describe each of the important steps in a use case’s normal execution.
Extensions description of aalternative steps from the ones in the Main Flow.
4. Functional Model
• Example: suppose we’re defining
requirements for a weblog content
management system (CMS).
4. Functional Model
Use cases
• In the next Module 4, we will learn some additional UML diagrams for
completing the description of the use cases.
• For use cases, we recommend the activity diagram, as users find it far easier to
understand since it resembles a traditional diagram. However, the state diagram
may be useful for use cases that are very interactive.
• For certain scenarios, the sequence diagram works well. We recommend that
you present it by showing the primary actor on the left, then an object
representing the system in a black box, and finally, any secondary actors that
may be requested during the scenario on the right of the system.
4. Functional Model
Use cases in UML
• Preconditions state what must always be true before a scenario is begun in the
use case. Preconditions are not tested within the use case; rather, they are
conditions that are assumed to be true. Typically, a precondition implies a
scenario of another use case, such as logging in, that has successfully completed.
• Note that there are conditions that must be true, but are not worth writing, such
as “the system has power.” Preconditions communicate noteworthy assumptions
that the writer thinks readers should be alerted to.
• Success guarantees (or postconditions) state what must be true on successful
completion of the use case—either the main success scenario or some alternate
path. The guarantee should meet the needs of all stakeholders.
4. Functional Model
Use Case
• Guideline to find and define use cases:
1. Choose the system boundary. Is it just a software application, the hardware and
application as a unit, that plus a person using it, or an entire organization?
2. Identify the primary actors—those that have goals fulfilled through using services of
the system.
3. Identify the goals for each primary actor.
4. Define use cases that satisfy user goals; name them according to their goal. Usually,
user-goal level use cases will be one-to-one with user goals, but there is at least one
exception, as will be examined.
• Of course, in iterative and evolutionary development, not all goals or use cases will be fully
or correctly identified near the start. It’s an evolving discovery.
4. Functional Model
https://youtu.be/zid-MVo7M-E
Contents
1. Introduction
• What will we learn
2. Object Oriented Analysis and Design
• OOA/D in the SDLC process
• Functional, Static and Dynamic views vs OOA/D
3. The Unified Modeling Language (UML)
• Views of the modeling
• Diagrams
4. Functional Model
• Use Cases
• UML: Modules 3-6
4. UML Modules 3-6
• The lessons on UML are divided into parts or Modules in accordance with the
three views of modelling: functional (Module 3), static (Module 5) and dynamic
(Module 4), whilst emphazising for each the dominating UML diagrams.
• Remember also that, in order to make a second differentiation - this time between
the levels of abstraction in the SDLC - a distinction has been made between: an
analysis level (comprising the functional view, as well as a subset of static and
dynamic views), excluding the component, deployment and collaboration
diagrams; and a design view (Module 6), which places emphasis on collaboration
diagrams and the design detail of class diagrams, and which also introduces
component and deployment diagrams.
4. UML Modules 3-6
• Let’s now see a summary of the steps that we will follow over the next modules
about using UML in this analysis phase.
4. UML Modules 3-6
4. UML Modules 3-6
• Work on the domain model once we
have the use cases.
• The domain model shows the basic
domain concepts and their relationships.
• It helps and must identify all the
conceptual classes of the system.
• Once we have the user cases, we can:
ü Draw the UML domain model
ü Add associations between the
identified objects.
ü Add the attributes necessary to full
fill the current use case.
4. UML Modules 3-6
System Sequence Diagram (SSD)