Chapter One (OOexit) 111301

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

Chapter one

Object Oriented Analysis and Design


OOAD
• In object oriented thinking, a system is considered as a collection of
classes and objects and the relationships that tie them together.
• It de-emphasizes procedures.
• The focus shifts from modeling business processes and data separately
to combining data and procedures into objects.
• Proponents of object-oriented development claim that users can more
easily understand objects than traditional representations of a system.
• Object oriented analysis and design are based on these objects and are
believed to more closely model the real world than previous methods,
which describe a system in terms of inputs, outputs, and data flows.
Benefits of Object Oriented Approach

The object method can provide the following potential benefits:


• Reusability. Objects are reusable; hence reduce the time and cost of writing software as well as
the incidence of defects.
• Maintenance costs are lowered by reducing multiple maintenance changes
• Once a library of objects exists, design and programming often can begin without waiting for
analysis documents. Rather, in theory, design and programming can be carried out together,
beginning as soon as the requirements are completed.
• Manage Complexity by abstraction
• Tackle more challenging problems
• By shifting the development effort into analysis it improves analyst and problem domain
interaction.
• Increase internal consistency across analysis, design and programming
• Build specifications resilient to change
What is Object Orientation?

• Definition: Object Orientation is about viewing and modeling the


world/system as a set of interacting and interrelated objects.
• Features of the OO approach:
• 1) The universe consists of interacting objects
• 2) Describes and builds systems consisting of objects
OO Principles:

1) Abstraction: A process allowing to focus on most important aspects


while ignoring less important details.
• Abstraction allows us to manage complexity by concentrating on
essential aspects making an entity different from others.
• An example of an order processing abstraction:
Customer, Salesman and Product
2) Encapsulation: Encapsulation separates implementation from
users/clients.
• A client depends on the interface(remote&TV)
Cont..
• 3) Modularity: Modularity breaks up complex systems into small, self contained pieces that
can be managed independently. Fore example, order processing system on the right side is
more modular than order processing system on the left side.

Order Entry
Order Processing
System Order Fulfillment
Billing

4) Hierarchy: Ordering of abstractions into a tree-like structure. You can take the organizational
structure of any organization.
Object-Oriented Concepts

• Objects: Representations of real-world things- "An object has state,


behavior, and identity; the structure and behaviors of similar objects are
defined in their common class; the terms instance and object are
interchangeable".
• Classes: Groups of related objects
• Messages: Information (for example, commands) sent between objects
• Inheritance: Ability to derive new classes from a base class
• Polymorphism: Derived class behaviors that are different from base class
behaviors. Poly means many and morph means form. In object-oriented
programming, polymorphism is a generic term that means 'many shapes'.
(from the Greek meaning "having multiple forms").
Cont..
• There are two types of polymorphism one is compile time
polymorphism and the other is run time polymorphism.
• Compile time polymorphism is functions and operators overloading.
• Runtime time polymorphism is done using inheritance and virtual
functions.
• Collaboration :It can be used to represents an object diagram shows
the objects and their relationships
• It shows, in addition to the association among objects, messages the
objects send to one another.
Cont..
• Object persistence:Objects have a life time.
• They are explicitly created and can exit for a period of time that,
traditionally, has been the duration of the process in which they were
created.
• This characteristic is called object persistence.
• Since most application programs need to deal with persistent data,
adding persistence to objects is essential to making object-oriented
applications useful in practice.
• Coupling: It is measure of the strength of association established by a
connection from one object or software component to another.
• It is a binary relationship.
• During the design evaluation it helps in focusing the impacts of
changes in the components.
• Strong coupling complicates the system, even for a small change.
Cont…
• Cohesion: It is a measure of the relative functional strength of a
module: An interaction within a single object or software component
is called cohesion.
• Highly cohesive components can have lower coupling, because only a
minimum set of information is required to be passed between
components.
• It help in designing classes that have very specific goals and clearly
defined purposes.
• In general the system should be loosely coupled and highly cohesive.
Cont…
Interface:
• The data base interface includes DDL (Data Definition Language) and
DML(Data Manipulation Language).
• Structured Query Language (SQL), is used to define and design a data base
and its schema.
• Data Definition and Data Definition Language is used to describe the
structure and relationship between objects stored in a data base. Example:
CREATE.
• Data Manipulation Language and query capabilities allow the users to
access and manipulate data organization such as INSERT, UPDATE, DELET,
SEELCT.
Cont…
Components
What is Component is?
• It does not reside in the minds of analysts and developers
• It is a physical entity that resides on a computer
• Something like a table, data file, dll, exe, document, etc
• A component can be a software implementation of one or more
classes
Object Oriented Design methods

During the early 90s, there were around 50 O-O methods, among them:
• Booch: Categories and Subsystems
• Coad and Yourdon: Class, Object, Class-&-Object
• Jacobson: Use cases, and OOSE
• Rumbaugh: Class and Associations, and OMT
Cont..
Unified Modeling Language
• UML was authored by Booch, Jacobson, and Rumbaugh, to unify and standardize
methods and tools to document the analysis and design of software systems
• UML defines structural and behavioral things and diagrams. UML is the language
of blueprints for software. It is a graphical language for:
• –visualizing
• –specifying
• –constructing
• –and documenting a software.

Cont..
There are nine different types of UML diagrams:
1) Diagrams used to describe structure:
• Class diagram
• Object diagram
• Component diagram
• Deployment diagram
Cont..
2)Diagrams used to describe behavior:
• Use Case diagram
• Sequence diagram
• Activity diagram
• Collaboration diagrams
• State chart diagram
Cont..
UML defines four structural relationships between things:
• Dependency (uses): A vehicle uses fuel
• Aggregation (has a): A car has axles
• Association: This vehicle is licensed by the California Department of
Motor Vehicles
• Generalization (is a): A car is a vehicle
Software Development Life Cycle

• The life of a software system can be represented as a series of cycles. A cycle


ends with the release of a version of the system to the customers.
• Software development life cycle encompasses the phases/processes that a
software developer goes through when developing new software.
• It consists of five basic phases: -
• System planning includes initial investigation
• System analysis includes requirements capture/elicitation
• System design
• System construction and implementation includes system testing
• System deployment
Cont..
• Every system development models that have been developed
incorporates these basic phases into their model, ex: - Waterfall
Model, Iterative Model, Unified Process etc
• Waterfall Model – typical of SDLC
Cont..
• Iterative across life cycle phases
Cont..
• Spiral life cycle model
Cont..
• The Unified Process
Cont..
• The Unified Process also called iterative and incremental life cycle, typical in
object oriented approach, sees each cycle as containing five phases:
• Inception- Establish the business case for the project
• Elaboration- Establish a project plan and a sound architecture
• Construction- Grow the system
• Transition- Testing and validating
• Production -Supply the system to its end users
• Within each phase are a number of iterations. Iteration represents a
complete development cycle, from requirements capture in analysis to
implementation and testing that result in the release of an executable project
Cont..
Five workflows cut across the set of four phases. Each workflow is a set of activities
that various project workers perform. The workflows are: -
Requirements
• Aims at building the use case model
• Captures the functional requirements of the new system
• Outcome: Use-case Diagram
Analysis
• Aims at building the analysis model
• Helps the developer refine and structure the functional requirements captured
within the use-case model
• Outcome: Class/Object Diagram, Sequence/Collaboration Diagram
Cont..
Design
• Aims at building the design model
• Describes the physical realizations of the use cases from the use-case models and
the contents of the analysis model
• Outcome: Sequence/Collaboration Diagram, Interfaces and Classes, extending the
UML
• Aims at building the deployment model
• Defines the physical organization of the system in terms of computational nodes
(geographical locations)
• Defines how things will be built
• Outcome: Deployment diagram
Cont..
Implementation
• Aims at building the implementation model
• Describes how elements of the design model are packaged into
software components, i.e. source code, DLLs etc
• Outcome: Component diagram
Test
• Performs unit, integration and system tests
• Use test cases that are derived directly from use-cases
• Types: black-box testing and white box testing
Cont..
Deployment
• Defines how system will be built and put into operation
• Uses the deployment model built during the design workflow
• Provide for a smooth transition from the old system to the newly constructed system
• In the UP, a software product is designed and built in a succession of incremental iterations. This allows
testing and validation of design ideas, as well as risk mitigation, to occur earlier in the lifecycle
• The Unified Process captures many of modern software development's best practices in a form suitable for a
wide range of projects and organizations:
• Develop software iteratively.
• Manage requirements
• Use component-based architectures
• Model software visually
• Continuously verify software quality
• Control changes to software
Views of a system

• Systems can be viewed from a number of perspectives


• different stakeholders: system owners, end users, analyst, developers, project
managers etc
• Each looks at the system in different angle at different times over the project’s
life span
• System architecture can be used to manage these different viewpoints,
therefore controlling the development of a system throughout its life cycle
• UML captures these different angles/viewpoints as a set of five
interlocking views: -
Cont..
Vocabulary System assembly
functionality configuration management
Design view Implementation
view

Use case view


Behavior
Process view Deployment view

Performance System topology


scalability distribution
throughput delivery
installation
Cont..
• Each view focused on a particular aspect of the system, are stand alone and interact
with each other
1. Use case view
• Focuses on scenarios executed by human users and external systems
• Expresses what the new system will do without specifying how it will do it
• End-product: use case diagrams
2. Design views
• Supports the functional requirements of the system
• Focuses on the things (classes, interfaces and collaborations) that form the vocabulary of the
problem that the system is trying to solve and the elements of the solution to that problem.
• The view encompasses the static and dynamic aspects of the system
• End-product: class and object diagram (static), sequence/collaboration, activity and state chart
diagram (dynamic)
Cont..
3. Process view
• Focuses on the aspects of the system that involves timing and the flow of control.
• Addresses the performance, scalability and throughput of the system
• End product: active class diagrams, activity diagrams
4. Implementation view
• Encompasses the components and files that are used to assemble and release the physical
system
• End-product: component diagrams
5. Deployment view
• Focuses on the geographic distribution of the various software elements on hardware and other
physical elements that constitute a system
• Encompasses the nodes that form the system’s hardware topology on which the system executes
• End-product: deployment diagram

You might also like