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
• The primary tasks in object-oriented analysis (OOA) are :
a. Identifying objects
b. Organizing the objects by creating object model diagram.
c. Defining the internals of the objects, or object attributes.
d. Defining the behavior of the objects, i.e., object actions.
e. Describing how the objects interact.
• The common models used in OOA are use cases and object models.
Object-Oriented Design:
• Object-Oriented Design (OOD) involves implementation of the conceptual model produced
during object-oriented analysis.
• The implementation details include :
A. Restructuring the class data (if necessary),
b. Implementation of methods, i.e., internal data structures and algorithms,
c. Implementation of control
d. Implementation of associations
Object design:-
Object design includes the following phases:
• Object identification
• . Object representation, i.e., construction of design models
• Classification of operations
• Algorithm design
• Design of relationships
• Implementation of control for external interactions
• Package classes and associations into modules
OOAD attachment with OMT:-
1. Object Modeling Technique (OMT) combines the three views of modeling 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
Relationship between OOA and OOD :
• When object orientation is used in analysis as well as design, the boundary between OOA and
OOD is blurred. This is particularly true in methods that combine analysis and design.
• One reason for this blurring is the similarity of basic constructs (i.e., objects and classes) that
are used in OOA and OOD.
Difference between OOA and OOD :-
1. The fundamental difference between OOA and OOD is that OOA 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, analysis deals with the problem domain, while design deals with the solution domain.
Documentation:-
1. Documentation is a software development process that records the procedure of making the
software.
2. The design decisions need to be documented for any non-trivial software system for
transmitting the design to others.
3. a good documentation is indispensable, particularly in the following areas :
a. In designing software that is being developed by a number of developers.
b. In iterative software development strategies.
c. In developing subsequent versions of a software project.
d. For evaluating a software.
e. For finding conditions and areas of testing.
f. For maintenance of the software.
Various Consideration of documentation designing:
1. It is a roadmap :
a. It allows standardization, and it helps to identify the stages that can be improved.
b. Process documentation also facilitates the training of new employees.
Flexible documentation:
• Companies change, update, improve, so their processes are also subject to constant changes.
• To improve the effectiveness of the process, incorporate the necessary adjustments to the
documentation of the process.
• Document the date of the last update.
• c. Save a backup copy of the files that document the process.
• d. Review the documents at least once a year.
Describe the structured analysis and structured design approach with an example.
Structured analysis and structure design:-
1. Structured Analysis and Structured Design (SA/SD) is diagrammatic notation which is design
to help people understand the system.
2. The basic goal of SA/SD is to improve quality and reduce the risk of system failure.
3. It establishes concrete management specification and documentation.
4. It focuses on solidity, pliability and maintainability of system.
5. The approach of SA/SD is based on the Data Flow Diagram.
6. It is easy to understand SA/SD but it focuses on well defined system boundary whereas JSD
approach is too complex and does not have any graphical representation.
7. SA/SD is combined known as SAD and it mainly focuses on following three points :
a. System
b. Process
c. Technology
8. SA/SD involves two phases : a. Analysis Phase :
A. It uses Data Flow Diagram, Data Dictionary, State Transition diagram and ER diagram.
b. Design Phase: It uses Structure Chart and Pseudo Code.
9. For example:
i. During structured design, data flow diagram processes are grouped into tasks and allocated to
operating system processes and CPUs.
ii. Data flow diagram processes are converted into programming language functions, and a
structure chart is created showing the procedure call tree.
Jackson Structured Development:-
1. 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.
2. JSD can start from the stage in a project when there is only a general statement of
requirements.
3. Following are the phases of JSD:
a. Modeling phase: In the modeling phase, the designer creates a collection of entity structure
diagrams and identifies the entities in the system, the actions they perform, the attributes of the
actions and time ordering of the actions in the life of the entities.
b. Specification phase : This phase focuses on actually what is to be done. Major goal is to map
progress in the real world on progress in the system that models it.
c. Implementation phase :
i. In the implementation phase JSD determines how to obtain the required functionality.
ii. Implementation way of the system is based on transformation of specification into efficient set
of processes.
How object-oriented concept can be implemented using non-object-oriented language?
Explain with an example.
Implementing an object-oriented concept in a non-object oriented language requires the
following steps:
1. Translate classes into data structures:
i. Each class is implemented as a single contiguous block of attributes. Each attribute contains
variable. Now an object has state and identity and is subject to side effects.
ii. A variable that identifies an object must therefore be implemented as a sharable reference.
2. Pass arguments to methods:
i. Every method has at least one argument. In a non-object-oriented language, the argument must
be made explicit.
ii. Methods can contain additional objects as arguments. In passing an object as an argument to a
method, a reference to the object must be passed if the value of the object can be updated within
the method.
3. Allocate storage for objects:
i. Objects can be allocated statically, dynamically or on a stack.
ii. Most temporary and intermediate objects are implemented as stack based variables.
iii. Dynamically allocated objects are used when there number is not known at compile time.
4. Implement inheritance in data structures:
Following ways are use to implement data structures for inheritance in a non-object-oriented
language :
i. Avoid it.
ii. Flatten the class hierarchy.
iii. Break out separate objects.
5. Implement associations: Implementing associations in a non-object oriented language can be
done by :
i. Mapping them into pointers
6. Encapsulate internal details of classes:
i. Object-oriented languages provide constructs to encapsulate implementation.
Write short note on translating object oriented design into an implementation.
i. It is easy to implement an object-oriented design with an object-oriented language since
language constructs are similar to design constructs.
ii. The following steps are required to implement an object oriented design in an object-oriented
language :
1. Class definitions :
i. The first step in implementing an object-oriented design is to declare object classes. Each
attribute and operation in an object diagram must be declared as part of its corresponding class.
ii. Assign data types to attributes. Declare attributes and operations as either public or private.
2. Creating objects :
i. Object-oriented languages create new objects in following two ways :
a. Class operation applied to a class object creates a new object of the class.
b. Using special operations that create new objects. ii. When a new object is created, the
language allocates storage for its attribute values and assigns it a unique object ID.
3. Calling operations: i. In most object-oriented languages, each operation has at least one
implicit argument, the target object, indicated with a special syntax. ii. Operations may or may
not have additional arguments.
4. Using Inheritance:
i. To implement inheritance object-oriented languages use different mechanisms.
ii. There are three independent dimensions for classifying inheritance mechanisms:
a. Static or dynamic
b. Implicit or explicit
c. Per object or per group.
iii. Many of the popular languages are static, implicit and per group.
5. Implementing associations:
i. There are two approaches to implement associations: buried pointers and distinct association
objects.
ii. If the language does not explicitly support association objects then buried pointers are easy to
implement.
iii. An association can also be implemented as a distinct container object.