Session 1 Introduction to OOAD and UML
Session 1
Introduction to OOAD and UML
OOAD with UML / Session 1 / 2 of 27
Objectives
Discuss the basic concepts of OOA and UML
Discuss the concept and use of UML
Give a whole preview of the elements of UML, and use simple examples to explain the function of UML
OOAD with UML / Session 1 / 3 of 27
Object Oriented Analysis and Design (OOA&D)
Object oriented Analysis and Design refers to the analysis and design of a system based on the concepts of object orientation.
UML is a diagrammatic approach to model the software to be developed.
OOAD with UML / Session 1 / 4 of 27
SDLC Software Development Life Cycle
(SDLC) is a sequence of activities carried out by analyst, designers, and users to develop and implement an information system.
Analyst – Studies requirements Designer – Designs the system User – An entity
OOAD with UML / Session 1 / 5 of 27
Object Oriented Analysis (OOA)
Phase of the project during which a precise and concise model of the problem in terms of real world objects and concepts as understood by the user is developed.
The analysis must also identify the relevant characteristics, interactions and relations between the entities.
This kind of real life mapping to computer analysis is the advantage offered by the Object Oriented Analysis.
OOAD with UML / Session 1 / 6 of 27
Object Oriented Design (OOD)
Programs are organized as co-operative collections of objects.
The purpose of Object Oriented Design is to adapt the results of OOA phase.
Designer defines the responsibilities, operations attributes and relationships of one or several classes.
Designer also designs the database and applies normalization techniques.
Diagrams can be classified into static or dynamic.
OOAD with UML / Session 1 / 7 of 27
Advantages of OOA&D over Traditional Analysis and Design
Close match between what is being implemented and the actual problem.
Promotes reuse of objects Since reuse of objects is possible, it reduces errors and
maintenance problems. Reuse of objects also speeds up the process of design and
development. Appeals to the working of human cognition, as it is our
natural way of thinking. Propagates data encapsulation Helps to handle the complexity of software development
and aids generation of adaptable and resilient software systems.
OOAD with UML / Session 1 / 8 of 27
Modeling A model is a simplification of reality Provides the blueprints of a system Models may encompass detailed plans A good model includes those elements that have
broad abstraction. Helps to visualize a system as it is or according to
the need. Models permit to specify the structure or behavior
of a system. Models give a template that guides in constructing
a system. Models document the decisions that have been
made
OOAD with UML / Session 1 / 9 of 27
SDLC Phases-1
OOAD with UML / Session 1 / 10 of 27
SDLC Phases-2 Preliminary Investigation (Feasibility Study)
An important outcome of the preliminary investigation is
determining whether the system to be developed is feasible
or not.
Requirement Analysis (Analysis) Involves study of the current business system in detail and to
find out how it works and where the improvements have to
be made.
OOAD with UML / Session 1 / 11 of 27
SDLC Phases-4 Design of the System
The design phase states how a system will meet the requirements identified during the systems analysis phase as mentioned in the Requirements Specifications.
Identification of data entry forms, data elements, reports, outputs the new system should produce, data elements and tables for database.
Sketch the form or display as expected to appear at the end of completion of the system.
Computation procedures explaining the process of deriving the output from given input.
OOAD with UML / Session 1 / 12 of 27
SDLC Phases-6
Software Construction Actual construction (coding) of the programs
System Testing Actual software code construction Unit Testing: White Box testing Independent Unit Testing
OOAD with UML / Session 1 / 13 of 27
SDLC Phases-8
System Testing After the programs are tested individually, the system as
a whole needs to be tested. All the software modules are integrated and tested to
ensure that they do not fail i.e. it will run according to specifications as mentioned in requirement specification document and in the way the users expected it to.
Special test data is prepared as input for processing and the results are examined to find out any deviations from the desired results.
OOAD with UML / Session 1 / 14 of 27
SDLC Phases-9
System Implementation Developed system is deployed at the user’s site for use User personnel are trained The data files needed by the system are constructed
System Maintenance Due to environmental changes, the software may turn obsolete
and it may call for modifications and enhancements for its effective use.
The activity of system maintenance may vary depending on the scale of modifications and enhancements.
OOAD with UML / Session 1 / 15 of 27
Model
The language used to represent a model is called a Modeling Language.
Object Model can be explained as a model to represent objects of a system.
Principle of Model Creation The choice of what models to create has a profound
influence on how a problem is attacked and how a solution is shaped.
No single model is sufficient. Every nontrivial system is best approached through a small set of nearly independent models.
OOAD with UML / Session 1 / 16 of 27
Object Oriented Model Creation
The contemporary view of software development is an object-oriented perspective. In this approach the main building block of all software systems is the object or class.
OOAD with UML / Session 1 / 17 of 27
UML in Brief Use-Case diagrams to illustrate user interactions with
the system. Class diagrams to illustrate logical structure Object diagrams to illustrate objects and links State diagrams to illustrate behavior Component diagrams to illustrate physical structure
of the software. Deployment diagrams to show the mapping of
software to hardware configuration Interaction diagram (i.e., collaboration and sequence
diagrams) to illustrate behavior. Activity diagrams to illustrate the flow of events in a
Use-Case.
OOAD with UML / Session 1 / 18 of 27
Introduction to UML Some of the leading companies that
have contributed towards and promoted the development of UML are
Hewlett – Packard Microsoft Oracle IBM Unisys
OOAD with UML / Session 1 / 19 of 27
History of UML
OOAD with UML / Session 1 / 20 of 27
Application in different systems
OOAD with UML / Session 1 / 21 of 27
Application in Software Development Life Cycle
Preliminary Investigation: Use Cases to capture the requirements of a customer.
Analysis: Class diagrams are made at real world abstract level to depict their existence and relationship.
Design: Classes are modeled Development: Programmers refer to the various UML
diagrams prepared in the design stage to understand and develop code.
Testing: UML has different diagrams to support testing of software.
OOAD with UML / Session 1 / 22 of 27
UML Overview Views- would mean ‘to observe’ or ‘to
examine’ Diagrams- is a part of a specific view and
when it is drawn it is allocated to a view. Relationships-provide a pathway for
communication between objects. Modeling Elements-consist of symbols that
help in preparing diagrams and views.
OOAD with UML / Session 1 / 23 of 27
Model Elements
Component Name
Use case name
Dependency
Generalization
Association
Aggregation (a form of Association)
Class
Attributes
Operations
OOAD with UML / Session 1 / 24 of 27
“4+1” view
OOAD with UML / Session 1 / 25 of 27
UML Hello World
OOAD with UML / Session 1 / 26 of 27
Component Source code components (e.g., .h, .cpp files,
shell scripts, data files) Binary code components. Examples include:
java Beans, ActiveX controls, COM objects (DLL’s and OCX’s from VB), CORBA objects)
Executable components (.exe’s) Stereotypes (with alternatives icons) may be
used to define these specific kinds of components.
OOAD with UML / Session 1 / 27 of 27
Summary UML is a modeling tool Various Diagrams of UML are used to model a system UML is used many areas of applications UML is used in all the phases of SDLC The “4+1 view” architectural model is a simplified
description (an abstraction) of a system from a particular perspective or vantage point, covering particular concerns, and omitting entities that are not relevant to this perspective.
Different parts of UML are Views Diagrams Relationships Model Elements