Unit 3 (Oosd)
Unit 3 (Oosd)
Syllabus
Object Modeling Techniques Stages
& Models
Object Design
Steps performed in Object
Design
Object Identification
Object Representation
Classification of Operations
Designing Algorithm
The Metrics for choosing the
optimal Algorithm are
Design of Relationships- Design of
Association
Design of Relationships-
Adjustment of Inheritance
Implementation Control
Implementation Control
Packaging Classes
Packaging Classes
Design Optimization
Structured Analysis &
Structured Design
Introduction
Structured Analysis
Data Flow Diagram
Notations of DFD
Level of DFD
DFD Level 0: Payroll System
DFD Level 1: Payroll System
Data Dictionary
The content that is not described in the DFD is described in the data
dictionary. It defines the data store and relevant meaning.
• A physical data dictionary for data elements that flow between
processes, between entities, and between processes and entities may
be included. This would also include descriptions of data elements
that flow external to the data stores.
• A logical data dictionary may also be included for each such data
element. All system names, whether they are names of entities,
types, relations, attributes, or services, should be entered in the
dictionary.
State Transition Diagram
• State transition diagram is similar to the dynamic model. It specifies
how much time the function will take to execute and data access
triggered by events. It also describes all of the states that an object
can have, the events under which an object changes state, the
conditions that must be fulfilled before the transition will occur and
the activities were undertaken during the life of an object.
Design Phase:
• Design Phase involves structure chart and
pseudocode.
• Structure Chart: It is created by the data flow
diagram. Structure Chart specifies how DFDS’s
processes are grouped into tasks and allocated to the
CPU.
• Pseudo Code: It is the actual implementation of the
system. It is an informal way of programming that
doesn’t require any specific programming language or
technology.
Advantages of Structured Analysis and
Structured Design (SA/SD):
2. Structured Analysis
3. Data Modeling
4. Process Modeling
5. Input/Output Design
6. Structured Design
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 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
• Later some steps were combined to create method with only three steps:
JSD Steps:
1.Modelling Step
2.Network Step
3.Implementation Step
Merits of JSD:
• 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.
• Example: In the library system, the Dynamic Model could include an activity
diagram illustrating the process of borrowing a book. States such as
"Available," "Checked Out," and "Overdue" might be represented in a state
diagram for the "Book" object.
• Functional Model:
• Functional Model focuses on the 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).
• Example: For the library system, the Functional Model might consist of a use case
diagram showing interactions between actors (such as "Librarian" and "Borrower")
and use cases (such as "Check Out Book" and "Return Book"). Data flow diagrams
could illustrate the flow of information between system components during these
processes.
• Object-Oriented Analysis and Design (OOAD) in OMT: Object-oriented
analysis and design involve the systematic application of object-oriented
principles to model and design systems. OMT is an instantiation of OOAD, and
the two are closely connected:
• Classes, objects, attributes, and methods are central to OMT's Object Model.
• Unified Modeling Language (UML): OMT heavily influenced the
development of the Unified Modeling Language (UML), which has
become the industry-standard notation for object-oriented modeling.
UML includes diagrams for the Object Model (class diagrams),
Dynamic Model (sequence diagrams, state diagrams), and Functional
Model (use case diagrams).
• Iterative Development: OMT, like other OOAD methodologies, supports
iterative development, allowing for refinement and evolution of models as
understanding deepens.
• Iterative cycles in OMT involve revisiting and refining the Object Model,
Dynamic Model, and Functional Model based on feedback and changing
requirements.
• In the above figure, Employee is a parent class and Executive is a child class. The Executive
class inherits all the properties of the Employee class.
multi-level inheritance
• In multi-level inheritance, a class is derived from a class which is also
derived from another class is called multi-level inheritance. In simple
words, we can say that a class that has more than one parent class is
called multi-level inheritance. Note that the classes must be at
different levels. Hence, there exists a single base class and single
derived class but multiple intermediate base classes.
Hierarchical Inheritance
• If a number of classes are derived from a single base class, it is
called hierarchical inheritance.
Hybrid inheritance
• Hybrid means consist of more than one. Hybrid inheritance is the
combination of two or more types of inheritance.
Multiple Inheritance
• Java does not support multiple inheritances due to ambiguity.
“The definition of classes and operation can
often be adjusted to increase the amount of
inheritance”.
• As When structuring classes and operations, developers can identify commonalities between different
classes and extract shared attributes and behaviors to a common base class. Suppose you are
designing a drawing application, and you want to represent different shapes such as circles,
rectangles, and triangles. Initially, you might create separate classes for each shape:
• In this initial design, each shape has its own class with a method for calculating its area. However, we
can adjust the class definitions to increase the amount of inheritance. This promotes code reusability,
as subclasses can inherit and reuse the code of their superclass, reducing redundancy.
• If new functionality needs to be added, it can often be added to the base class, and all subclasses
automatically inherit the changes. This enhances the maintainability and extensibility of the
codebase.
How do you map the object-oriented concepts using non-
object-oriented languages? Explain with an example
Implementing an object-oriented concept in a non-object oriented language requires
the following steps :