Sie sind auf Seite 1von 41

OBJECT ORIENTED ANALYSIS AND DESIGN

Unit-I
Introduction to OOAD
 What is OOAD?
What is UML?
What are the United Process (UP) phases
Course Objectives: Having successfully completed this course, the student will be able to:

 To develop background knowledge as well as core expertise in object oriented system.


 To provide the importance of the software design process.
 To assess the unified process and Unified Modeling Language

Course Outcome:

 To describe the unified process phases of object-orientation methodologies and explain


the benefits of each.
 To create use case documents that capture requirements for a software system.
 To create class diagrams that model both the domain model and design model of a
software system.
To design the interface between the classes and objects.
To create interaction diagrams that models the dynamic aspects of a software
system.
To understand and the facets of the Unified Process approach to designing
and building a software system.
To describe how design patterns facilitate development and list several of
the most popular patterns.
To design the objects with responsibilities.
To build a model for the user interface(UI) of a software application
To measure the Level of User satisfaction and software quality assurance.
object oriented analysis and design goals:
It is one of the method of tracking problems by capturing the
design that is easy to communicate, review, implement and evolve.
Define analysis.
Analysis emphasizes an investigation of problem rather than how
a solution is defined. “Do the right thing”.
Define design.
Design emphasizes conceptual solution of problem rather than
implementation. “Do the thing right”.
1.What is Object-Oriented Analysis and Design?
During object-oriented analysis there is an emphasis on finding and
describing the objects or concepts in the problem domain. For
example, in the case of the flight information system, some of the
concepts include Plane, Flight, and Pilot.
During object-oriented design (or simply, object design) there is an
emphasis on defining software objects and how they collaborate to
fulfill the requirements. The combination of these two concepts
shortly known as object oriented analysis and design.
Define OO analysis and design.

The essence of object oriented analysis and design is to consider a


problem domain and logical solution from the prescriptive of object.
OO Analysis find and describe the object. OO Design emphasizes
defining the object’s attribute and methods.
List the key steps in OOAD.:
 Define usecases
 Define domain model
 Define interaction diagram
 Define design class diagram
domain model:
 Object-oriented analysis is concerned with creating a description
of the domain from the perspective of objects.
 There is an identification of the concepts, attributes, and
associations that are considered noteworthy.

 The result can be expressed in a domain model that shows the


noteworthy domain concepts or objects.
 It can be noted that a domain model is not a description of
software objects; it is a visualization of the concepts or mental
models of a real-world domain and it is also called a conceptual
object model
Unified Modeling Language(UML) :
 The Unified Modeling Language(UML) is a visual language for
specifying, constructing and documenting the artifacts of systems.

 The word visual in the definition is a key point -the UML is the de facto
standard diagramming notation for drawing or presenting pictures (with
some text) related to software primarily OO software

 Unified modeling language is a visual language used for specifying,


constructing nd documenting a system. It is a standard diagrammatic
notation used for drawing, presenting pictures related to software
engineering.
Define UML.
Unified modeling language is a visual language used for specifying,
constructing nd documenting a system. It is a standard diagrammatic
notation used for drawing, presenting pictures related to software
engineering.
The word visual in the definition is a key point -the UML is the de facto
standard diagramming notation for drawing or presenting pictures (with
some text) related to software primarily OO software
What are the three ways to apply UML?
 UML as a sketch.
 UML as a blue print.
 UML as a programming language.
• Three ways to apply UML:

• 1) UML as sketch Informal and incomplete diagrams (often hand sketched on


whiteboards)created to explore difficult parts of the problem or solution space,
exploiting the power of visual languages.

• 2) UML as blueprint Relatively detailed design diagrams used either for

•1) reverse engineering to visualize and better understanding existing code in UML
diagrams, or for

• If reverse engineering, a UML tool reads the source or binaries and generates
(typically) UML package, class, and sequence diagrams. These "blueprints" can help
the reader understand the big picture elements, structure, and collaborations
•2) code generation (forward engineering).

• Before programming, some detailed diagrams can provide guidance for code
generation (e.g., in Java), either manually or automatically with a tool.

• It's common that the diagrams are used for some code, and other code is filled
in by a developer while coding (perhaps also applying UML sketching).

). 3) UML as programming language -Complete executable specification of a


software system in UML. Executable code will be automatically generated, but is
not normally seen or modified by developers; one works only in the UML
"programming language."
• This use of UML requires a practical way to diagram all behavior or logic

(probably using interaction or state diagrams), and is still under development in

terms of theory, tool robustness and usability.


List the perspectives of UML.
 Conceptual perspectives.
 Specification perspectives.
 Implementation perspectives
conceptual perspectives.
UML diagrams are used to describe things in situations of real world. Raw UML bject
diagram notation used to visualize.
specification perspectives.
It describes the real world things, software abstraction and component with specification
and interfaces .Raw UML class diagram notation used to visualize software components.
implementation perspectives.
UML diagram describe the software component implementation in a particular technology.
Define Unified Process (UP).

Unified process is a iterative process, risk driven process and architecture centric approach to software
development. It comes under software development process.

 A software development process describes an approach to building, deploying, and possibly


maintaining software.

 The Unified Process has emerged as a popular iterative software development process for
building object-oriented systems. In particular, the Rational Unified Process or RUP, a detailed
refinement of the Unified Process, has been widely adopted.

 The UP is very flexible and open, and encourages including skillful practices from other

iterative methods, such as from Extreme Programming (XP), Scrum, and so forth
Importance of the Unified Process(UP):

1) The UP is an iterative process. Iterative development influences


how to introduce OOA/D , and to understand how it is best
practiced.
2) UP practices provide an example structure for how to do and thus
how to explain OOA/D.
3) The UP is flexible, and can be applied in a lightweight and agile
approach that includes practices from other agile methods (such as XP or
Scrum).
. List the phases of UP.:
UP has four phases.
 Inception.
 Elaboration.
 Construction
 . Transition
 PRODUCTION
Inception:
 Inception is the initial short step to establish a common
vision and basic scope for the Project.
 It will include analysis of perhaps 10% of the use cases,
analysis of the critical non-Functional requirement, creation
of a business case, and preparation of the development
 Environment so that programming can start in the
elaboration phase.

Inception in one Sentence: Envision the product scope, vision, and


business case
advantages of inception. :
 Estimation or plans are expected to be reliable.
 After inception, design architecture can be made easily
because all the use cases are written in detail.
2) Elaboration – Refined B-Vision, iterative implementation of the core architecture,

resolution of high risks, identification of most requirements and scope, more realistic estimates

3) Construction – Iterative implementation of the remaining lower risk and easier elements,

and preparation for deployment

4) Transition – beta tests, deployment

5) production-final phase, in this phase mainly the maintenance activities are

conducted in order to support the user in operational environment.


The other Critical UP practices:
The idea for UP practice is short time boxed iterative, evolutionary, and adaptive
development. Some additional best practices and key ideas in UP are

 Tackle high-risk and high-value issue in early iterations


 Continual evaluation, feedback and requirements from users
 Build cohesive, core architecture in early iterations
 Continuously verify quality; test early, often and realistically
 Practice Change Request and Configuration Management
UML Diagrams
Overview of UML Diagrams
Behavioral
Structural
: behavioral features of a system / business
process
: element of spec. irrespective of time
• Activity
• State machine
• Class
• Use case
• Component
• Interaction
• Deployment
• Object
• Composite structure Interaction
• Package : emphasize object interaction

• Communication(collaberati
on)
• Sequence
• Interaction overview
• Timing
Diagrams
Class diagrams: Represents static structure

Use case diagrams: Sequence of actions a system


performs to yield an observable result to an actor

Sequence diagrams:Shows how groups of objects


interact in some behavior

State diagrams: Describes behavior of system by


describing states of an object
Class diagram

UML class diagrams show the classes of the system,


their inter-relationships, and the operations and
attributes of the classes
• Explore domain concepts in the form of a domain model

• Analyze requirements in the form of a conceptual/analysis model

• Depict the detailed design of object-oriented or object-based

software
Class Diagrams
• Better name: “Static structure diagram”
• Doesn’t describe temporal aspects
• Doesn’t describe individual objects: Only the overall structure of the system
• There are “object diagrams” where the boxes represent instances
• But rarely used—other diagrams serve the role of describing object
interaction better
• When used, object diagrams describe static structure, like a data structure
Classes
A class is a description of a set of
ClassName objects that share the same attributes,
operations, relationships, and semantics.
attributes
Graphically, a class is rendered as a
rectangle, usually including its name,
operations attributes, and operations in separate,
designated compartments.

Software Design (UML) © SERG


Class Names
The name of the class is the only required
ClassName tag in the graphical representation of a
class. It always appears in the top-most
attributes compartment.

operations

Software Design (UML) © SERG


Class Attributes

Person

name : String An attribute is a named property of a


address : Address class that describes the object being modeled.
birthdate : Date In the class diagram, attributes appear in
ssn : Id the second compartment just below the
name-compartment.

Software Design (UML) © SERG


Class Diagrams
• Better name: “Static structure diagram”
• Doesn’t describe temporal aspects
• Doesn’t describe individual objects: Only the overall structure of the system
• There are “object diagrams” where the boxes represent instances
• But rarely used—other diagrams serve the role of describing object
interaction better
• When used, object diagrams describe static structure, like a data structure
Class Diagrams
• Better name: “Static structure diagram”
• Doesn’t describe temporal aspects
• Doesn’t describe individual objects: Only the overall structure of the system
• There are “object diagrams” where the boxes represent instances
• But rarely used—other diagrams serve the role of describing object
interaction better
• When used, object diagrams describe static structure, like a data structure
Notation in Class Boxes

Abstract classes (and operations) in italics


+ is public, - is private, # is protected
Can also specify stereotypes or compartments
“constructors” or “query”
“controller”
Class diagram
 A class diagram depicts classes and their interrelationships

 Used for describing structure and behavior in the use cases

 Provide a conceptual model of the system in terms of


entities and their relationships

 Used for requirement capture, end-user interaction

 Detailed class diagrams are used for developers


Class diagram
 Each class is represented by a rectangle subdivided into three compartments
 Name
 Attributes
 Operations

 Modifiers are used to indicate visibility of attributes and operations.


 ‘+’ is used to denote Public visibility (everyone)
 ‘#’ is used to denote Protected visibility (friends and derived)
 ‘-’ is used to denote Private visibility (no one)

 By default, attributes are hidden and operations are visible.


OO Relationships

 There are two kinds of Relationships


 Generalization (parent-child relationship)
 Association (student enrolls in course)

 Associations can be further classified as


 Aggregation
 Composition
OO Relationships: Generalization

Supertype Example: Customer

Regular Loyalty
Customer Customer

Subtype1 Subtype2
-Inheritance is a required feature of object orientation
-Generalization expresses a parent/child relationship among related classes.
-Used for abstracting details in several layers
OO Relationships: Association

 Represent relationship between instances of classes


 Student enrolls in a course
 Courses have students
 Courses have exams
 Etc.

 Association has two ends


 Role names (e.g. enrolls)
 Multiplicity (e.g. One course can have many students)
 Navigability (unidirectional, bidirectional)
Association: Multiplicity and Roles
student
1 *
University Person

0..1 *
employer teacher

Multiplicity Role
Symbol Meaning
1 One and only one Role
0..1 Zero or one “A given university groups many people;
M..N From M to N (natural language)
some act as students, others as teachers.
A given student belongs to a single
* From zero to any positive integer university; a given teacher may or may not
0..* From zero to any positive integer be working for the university at a particular
1..* From one to any positive integer time.”
Class diagram

[from UML Distilled Third Edition]

Das könnte Ihnen auch gefallen