100% found this document useful (1 vote)
27 views13 pages

OOP Unit 3

oop unit 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
27 views13 pages

OOP Unit 3

oop unit 3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

UNIT-3

Object Oriented Analysis

Object-Oriented Analysis
Object–Oriented Analysis (OOA) is the procedure of identifying software engineering
requirements and developing software specifications in terms of a software system’s
object model, which comprises of interacting objects.

The primary tasks in object-oriented analysis (OOA) are:

 Identifying objects
 Organizing the objects by creating object model diagram
 Defining the internals of the objects, or object attributes
 Defining the behavior of the objects, i.e., object actions
 Describing how the objects interact

The common models used in OOA are use cases and object models.

Object-Oriented Design

Oriented Design (OOD) involves implementation of the conceptual model produced


during object-oriented analysis. In OOD, concepts in the analysis model, which are
technology−independent,are mapped onto implementing classes, constraints are
identified and interfaces are designed, resulting in a model for the solution domain,
i.e., a detailed description of how the system is to be built on concrete technologies.

The implementation details generally include:

 Restructuring the class data (if necessary)


 Implementation of methods, i.e.
 internal data structures and algorithms,
 Implementation of control, and
 Implementation of associations.

1
Difference between OOA and OOD:
1. The fundamental difference between 00A and 00D is that 00OA models the
problem domain, leading to an understanding and specification of the problem,
while the OOD models the solution to the problem.

2. That is, analys is deals with the problem domain, while design deals with the
solution domain.

2
Structured Analysis and Structured Design (SA/SD):-
Structured Analysis and Structured Design (SA/SD) is a diagrammatic notation that
is designed to help people understand the system. The basic goal of SA/SD is to
improve quality and reduce the risk of system failure. It establishes concrete
management specifications and documentation. It focuses on the solidity, pliability,
and maintainability of the system.
Basically, the approach of SA/SD is based on the Data Flow Diagram. It is easy to
understand SA/SD but it focuses on well-defined system boundary whereas the JSD
approach is too complex and does not have any graphical representation.
SA/SD is combined known as SAD and it mainly focuses on the following 3 points:
1. System
2. Process
3. Technology

SA/SD involves 2 phases:


1. Analysis Phase: It uses Data Flow Diagram, Data Dictionary, State Transition
diagram and ER diagram.
2. Design Phase: It uses Structure Chart and Pseudo Code.

For example

1. During structured design, data flow diagram processes are grouped into tasks
and allocated to operating system processes and CPUs.
2. Data flow diagram processes are converted into programming language
functions,

Advantages of (SA/SD):

1. Clarity and Simplicity: The SA/SD method emphasizes breaking down complex
systems into smaller, more manageable components, which makes the system
easier to understand and manage.
2. Better Communication: The SA/SD method provides a common language and
framework for communicating the design of a system, which can improve
communication between stakeholders and help ensure that the system meets their
needs and expectations.

3
3. Improved maintainability: The SA/SD method provides a clear, organized
structure for a system, which can make it easier to maintain and update the
system over time.
4. Better Testability: The SA/SD method provides a clear definition of the inputs
and outputs of a system, which makes it easier to test the system and ensure that
it meets its requirements.

Disadvantages of (SA/SD):

1. Time-Consuming: The SA/SD method can be time-consuming, especially for


large and complex systems, as it requires a significant amount of documentation
and analysis.
2. Inflexibility: Once a system has been designed using the SA/SD method, it can
be difficult to make changes to the design, as the process is highly structured and
documentation-intensive.
3. Limited Iteration: The SA/SD method is not well-suited for iterative
development, as it is designed to be completed in a single pass.

Jackson System Development (JSD)

 Jackson Structured Development (JSD) is another methodology, which has a


different style than SA/SD or OMT. The JSD methodology was developed by
Michael Jackson

 Jackson System Development (JSD) is a method of system development that


covers the software life cycle either directly or by providing a framework into
which more specialized techniques can fit.

 JSD can start from the stage in a project when there is only a general
statement of requirements.

 Following are the Phases of JSD:-


1. Modelling Phase
In the modelling phase of JSD, the designer creates a collection of
entity structure diagrams and identifies the entities in the system, the

4
actions they perform, the attributes of the actions and the time order of
the actions in the life of the entities.

2. Specification Phase
This phase focuses on actually what is to be done? Previous phase
provides the basic for this phase. An sufficient model of a time-ordered
world must itself be time-ordered. Major goal is to map progress in the
real world on progress in the system that models it.

3. Implementation Phase
In the implementation phase JSD determines how to obtain the
required functionality. Implementation way of the system is based on
the transformation of the specification into an efficient set of
processes. The processes involved in it should be designed in such a
manner that it would be possible to run them on available software and
hardware.

JSD Steps
Initially there were six steps when it was originally presented by Jackson, they were
as below:

1. Entity/action step
2. Initial model step
3. Interactive function step
4. Information function step
5. System timing step
6. System implementation step

Advantages of JSD
1. It is designed to solve real time problem.
2. JSD considers concurrent processing and timing.
3. JSD modeling focuses on time.
4. It provides functionality in the real world.
5. Excellent methodology for micro code application.

5
Disadvantages of JSD
1. JSD is a poor approach for high level analysis and data base design.
2. JSD is a complex methodology due to pseudo code representation.
3. It is a bit complex and difficult to understand.
4. It is less graphically oriented as compare to SA/ SD or OMT.

Object Modeling Technique (OMT)

Object Modeling Technique (OMT) is a real-world-based modeling approach for


software modeling and designing.

Combining three models:


Following are the three models in OMT:

After analysis, we have the object, dynamic, and functional models, but the object
model is the main framework around which the design is constructed.

1. Object Model
 Object Model encompasses the principles of abstraction, encapsulation,
modularity, hierarchy, typing, concurrency and persistence.
 Object Model basically emphasizes on the object and class.
 Main concepts related with Object Model are classes and their association
with attributes.
 Predefined relationships in object model are aggregation and generalization
(multiple inheritance).

2. Dynamic Model
 Dynamic Model involves states, events and state diagram (transition diagram)
on the model.
 Main concepts related with Dynamic Model are states, transition between
states and events to trigger the transitions.
 Predefined relationships in object model are aggregation (concurrency) and
generalization.

6
3. Functional Model
 Functional Model focuses on how data is flowing, where data is stored and
different processes.
 Main concepts involved in Functional Model are data, data flow, data store,
process and actors.
 Functional Model in OMT describes the whole processes and actions with
the help of data flow diagram (DFD).

Physical packaging:-
Programs are made of discrete physical units that can be edited, compiled, imported,
or otherwise manipulated. In some languages, such as C and Fortran, the units are
source files. In Ada, the package is an explicit language construct for modularity.
Object-oriented languages are various degrees of packaging. In any large project,
careful partitioning of implementation into packages (of whatever form) is important
to permit different persons to cooperatively work on a program.

Packaging involves the following issues


Hiding internal information from outside view
Coherence of entities
Constructing physical modules

Adjustment of inheritance
As object design progresses, the definitions of classes and operations can
often be adjusted to increase the amount of inheritance. The designer should:
Rearrange and adjust classes and operations to increase the inheritance
Abstract common behaviour out of groups of classes
Use delegation to share behaviour when inheritance is semantically invalid

7
OOAD attachment with OMT:
1. Object Modeling Technique (OMT) combines the three views of modelling systems
2. The object model represents the static, structural, "data" aspects of a system.
3. The dynamic model represents the temporal, behavioral, "control" aspects of a
system.
4. The functional model represents the transformational, "function" aspects of a
system.
5. A typical object oriented software procedure incorporates all three aspects: It uses
data structures (object model), it sequences operations in time (dynamic model), and it
transforms values (functional model).
Each model contains references to entities in other models.

For example, operations are attached to objects in the object model but more fully
expanded in the functional model.

Compare the OMT methodology with SA/SD methodology

8
Mapping object-oriented concepts using non-object-oriented
Language
Implementing an object-oriented design in a non-object-oriented language requires
basically the same steps as implementing a design in an object oriented language. The
programmer using a non-object-oriented language must map object-oriented concepts
into the target language, whereas the compiler for an object-oriented language
performs such: napping automatically. The steps required to implement a design are:

Translate classes into data structures


Pass arguments to methods
Allocate storage for objects
Implement inheritance in data structures
Implement method resolution
Implement associations
Deal with concurrency
Encapsulate internal details of classes

9
Procedural v/s OOP

10
Object-Oriented Programming Style
Reusability:
Reusable software reduces design, coding, and testing cost by amortizing
effort over several designs. Reducing the amount of code also simplifies
understanding, which increases the likelihood that the code is correct. Reuse
is possible in conventional languages, but object-oriented languages greatly
enhance the possibility of code reuse.

Extensibility:
Extensibility is a system design principle where the implementation takes
future growth into consideration. It is a systemic measure of the ability to
extend a system and the level of effort required to implement the extension.
Extensions can be through the addition of new functionality or through
modification of existing functionality. The central theme is to provide for
change typically enhancements while minimizing impact to existing system
functions.

Robustness
A method is robust if it does not fail even if it receives improper parameters.
Robustness against internal bugs may be traded off against efficiency.
Robustness against user errors should never be sacrificed.
Protect against errors. The software should protect itself against incorrect user
input. Incorrect user input should never cause a crash. Any method that
accepts user input must validate input that could cause trouble.

Implementing Inheritance
There are several ways to implement data structures for inheritance in a
nonobject- oriented language:
Avoid it. Many applications do not require inheritance. Many other applications
have only a few classes requiring inheritance. Those classes not needing
inheritance can be implemented as simple records.

11
Flatten the class hierarchy. Use inheritance during design but expand each
concrete class as an independent data structure during implementation. Each
inherited operation must be reimplemented as a separate method on each
concrete class. Flattening the hierarchy introduces duplication, but the use of
language constructs such as C macros can help. One useful technique is to
group some inherited attributes into a record type and embed the record in
each concrete class to reduce the number of duplicated lines in each
declaration.
Break out separate objects. Instead of inheriting common attributes from a
superclass, a group of attributes can be pulled out of all the subclasses and
implemented as a separate object with a reference to it stored within each
subclass. Grouping attributes under a separate type permits a single method
to be written to manipulate them. The subclasses must delegate operations to
the referenced object.

Implementing Inheritance

There are several ways to implement data structures for inheritance in a non
object- oriented language:

12
Encapsulation

Encapsulation is the process of binding both attributes and methods together


within a class. Through encapsulation, the internal details of a class can be
hidden from outside. It permits the elements of the class to be accessed from
outside only through the interface provided by the class.

Important Questions of UNIT-3

2. Briefly define Encapsulation.


3. Differentiate between Procedural and Object-Oriented language features.
4. Explain the advantages and disadvantages of SA/SD and JSD in comparison to
Object-Oriented Analysis and Design?
5. Explain about the Jackson Structured Development (JSD) in Object Oriented
Analysis.

13

You might also like