0% found this document useful (0 votes)
22 views65 pages

Unit 3 (Oosd)

Uploaded by

HIMANSHU DHINGRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views65 pages

Unit 3 (Oosd)

Uploaded by

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

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):

• Clarity and Simplicity: breaking down complex systems into


smaller
• Better Communication: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.
• Improved maintainability:easier to maintain and update the
system over time.
• 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 Structured Analysis and
Structured Design (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.
Steps involved in the SA/SD
process
1. Requirements

2. Structured Analysis

3. Data Modeling

4. Process Modeling

5. Input/Output Design

6. Structured Design

7. Implementation and Testing


Jackson System Development
(JSD)
• Jackson System Development (JSD) is a method of
system development that covers the software life cycle
either
Phases of JSD:
• JSD has 3 phases:

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

2.Initial model step

3.Interactive function step

4.Information function step

5.System timing step

6.System implementation 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:

• It is designed to solve the real-time problems.

• JSD modelling focuses on time.

• It considers simultaneous processing and timing.

• Provides functionality in the real world.

• It is a better approach for microcode applications.


Demerits of JSD:

• It is a poor methodology for high level analysis and


database design.

• JSD is a complex methodology due to pseudo code


representation.

• It is less graphically oriented as compared to SA/SD or


OMT.

• It is a bit complex and difficult to understand.


Definedocumentation?What are the various
considerations in documentation designing?
Explain.

• Documentation refers to the process of recording, describing and


providing information about a system, process, product, or service. It
involves creating written or visual materials that convey details such as
instructions, guidelines, specifications, policies, and procedures.
Documentation serves as a crucial tool for communication, knowledge
sharing, and reference. It can take various forms, including manuals,
guides, diagrams, code comments, and more.
Considerations in
Documentation Designing:
• Roadmap for others: It allows standardization and it helps to identify the stages that can be
improved. Process documentation also facilitated the training of new employees.
• Provide Detailed Object Model Description: Use UML diagrams (graphical form) to visually
represent relationships and structures. Accompany these with textual class descriptions that
provide in-depth details about each class, including attributes and methods.
• Provide Detailed description of Functional Model: Provide updated use cases, activity
diagrams, and other functional model elements. Clearly articulate how the system's
functionality has evolved based on design decisions.
• Keeping Dynamic Model updated: Ensure that any modifications to the dynamic behavior of
the system are accurately documented. This includes updates to sequence diagrams, state
charts, or any other dynamic model elements.
• Structured Pseudocode for Algorithms: Describe the algorithms in a step-by-step manner,
providing clarity on decision points, loops, and data manipulations. Use comments to explain
complex sections.
• Make it Public: The documentation of the processes must be available to all team and company
members.
SA/SD and OMT
SA/SD
• Originally not designed for object-oriented development; more aligned with
procedural programming and modular design.
• 1.SA/SD methodology does not describe how to do the activities such as project
management, cost estimation, cost benefit analysis, controlling the time,
project strategy, validation & verification, testing and how to apply quality
metrics and quality assurance.
• 2. SA/SD approach is based on the data flow Diagram.
• 3. SA/SD is easy to understand but it focuses on well defined system boundary
• 4. The basic goal of SA/SD is to improve quality and reduce the risk of System
failure.
• 5. it involves 2 phases: Analysis and Design phase
JSD:
Inherently compatible with object-oriented concepts, supporting the modeling of
objects, classes, and their relationships.
1.JSD methodology does not cover all the aspects of analysis, it excludes some analysis
tasks e.g. project proposal, analysis of environment, requirement analysis, feasibility
study, cost benefit analysis…etc.
JSD can be applied efficiently only with problems whose subject matter has a strong time
ordering, namely sequential processes and it cannot be applied efficiently on real time
systems e.g. air craft monitoring system and scientific systems.
2.JSD approach is action-oriented.
3. whereas JSD approach is too complex and does not have any graphical representation.
4.The fundamental principle of JSD[6] is that it focuses on describing the real world by
the system i.e. its main focus is to map the progress in the real world rather than
specifying the functions performed by the system i.e its main focus is to map the
progress in the real world.
5. JSD consists of 3 stages: Modeling,Network design,Implementation
Discuss three models involved in Object Modeling
Technique (OMT) with example? How is the object-
oriented analysis and design attached with OMT?
Object Modeling Technique’s Models:
There are three main types of models that has been proposed by OMT:
• 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).
• Example: Consider a library system. Objects in the Object Model might include
"Book," "Author," and "Library." Attributes of a "Book" object could include title,
author, and publication date. Relationships might include associations like "written
by" between "Author" and "Book."
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.

• 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:

• Concepts of OOAD in OMT: OMT incorporates fundamental object-oriented


concepts such as encapsulation, inheritance, and polymorphism.

• 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.

• Use of Diagrams: OMT utilizes various types of diagrams (e.g., class


diagrams, state diagrams, use case diagrams) to visually represent different
aspects of a system, fostering better communication among stakeholders.
Explain inheritance with support of suitable
example. The definition of classes and operation
can often be adjusted to increase the amount of
inheritance”. Justify your answer.
• Inheritance

• Inheritance is a mechanism of driving a new class from an existing class.


The existing (old) class is known as base class or super class or parent class.
The new class is known as a derived class or sub class or child class.

• It allows us to use the properties and behavior of one class (parent) in


another class (child). Let's discuss each with proper example.
Single Inheritance
• In single inheritance, a sub-class is derived from only one super class. It inherits the
properties and behavior of a single-parent class. Sometimes it is also known as simple
inheritance.

• 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 :

1. Translate classes into data structures : i. Each class is implemented as a single


contiguous block of attributes. Each attribute contains a 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.
• iv. A general object can be implemented as a data structure allocated on request at run time from a heap.
• 4 Implement inheritance in data structures: Following ways are use to implement data structure for inheritance in non object
oriented programming language. Avoid it, Flatten the class hierarchy, Break out separate objects.
• 5 Implement method resolution : Method resolution is one. main features of an object-oriented language that is lacking in a non
object-oriented language. Method resolution can be implemented in a following ways: Avoid it, Resolve methods at compile time,
Resolve methods at run time.
• 6. Implement associations: Implementing associations in a non oriented language can be done by : Mapping them into pointers,
Implementing them directly as association container objects.
• 7. Deal with concurrency: Most languages do not explicitly support concurrency.
• Concurrency is usually needed only when more than one external event occurs, and the behaviour of the program depends on
their timing.
• 8. Encapsulate internal details of classes : Object-oriented languages provide constructs to encapsulate implementation. Some of
this encapsulation is lost when object-oriented concepts translated into a non-object-oriented language, but we can still take
advantage of the encapsulation facilities provided by language.
What do you mean by the optimization of design? Discuss
the design optimization with suitable example using
diagrams.

• Optimization of design refers to the process of refining a system's design to


achieve better performance, efficiency, or other desirable characteristics. In
software engineering, design optimization aims to enhance the quality and
effectiveness of a system by identifying and implementing improvements in
the design.
• The original information is not discarded, but new redundant information is
added to optimize access paths and preserve intermediate results that would
otherwise have to be recomputed. Algorithm can be rearranged to reduce the
no. Of operations to be executed.
• During design optimization, the designer must
• Add redundant associations to minimize access cost : Consider a system that models a
basic library with two classes: Book and Library. Let's say we want to optimize the
system to minimize access costs when retrieving information about books and their
authors. One way to achieve this is by adding a redundant association between Library
and Book. By maintaining a redundant list of authors in the Library class, we reduce the
need to access individual books to retrieve author information, thus minimizing access
costs.
• Rearrange the computation for greater efficiency: Suppose In the original design, the
display Result method involves two separate method calls,for add and product. But to
optimized design , the add and multiply methods have been removed, and the
computation is directly performed within the displayResult method. By rearranging the
computation, we eliminate the need for separate method calls and intermediate
variables.
• Save derived attributes to avoid recomputations of complicated expressions : In
programming terms, this is like saving a piece of information (the file size or the area of
a circle) so you don't have to redo the whole calculation every time you need that
information. It's a way of making things quicker and more efficient
key concepts of SA/SD

• Functional Decomposition: SA/SD uses functional decomposition to


break down a complex system into smaller, more manageable
subsystems. This technique involves identifying the main functions of
the system and breaking them down into smaller functions that can
be implemented independently.
• Data Flow Diagrams (DFDs): SA/SD uses DFDs to model the flow of
data through the system. DFDs are graphical representations of the
system that show how data moves between the system’s various
components.
• Data Dictionary: A data dictionary is a central repository that contains
descriptions of all the data elements used in the system. It provides a clear
and consistent definition of data elements, making it easier to understand
how the system works.
• Structured Design: SA/SD uses structured design techniques to develop the
system’s architecture and components. It involves identifying the major
components of the system, designing the interfaces between them, and
specifying the data structures and algorithms that will be used to
implement the system.
• Modular Programming: SA/SD uses modular programming techniques to
break down the system’s code into smaller, more manageable modules. This
makes it easier to develop, test, and maintain the system.
The following are the steps
involved in the SA/SD process:
• Requirements gathering: The first step in the SA/SD process is to
gather requirements from stakeholders, including users, customers,
and business partners.
• Structured Analysis: During the Structured Analysis phase, the
requirements are analyzed to identify the major components of the
system, the relationships between those components, and the data
flows within the system.
• Data Modeling: During this phase, a data model is created to
represent the data used in the system and the relationships between
data elements.
• Process Modeling: During this phase, the processes within the
system are modeled using flowcharts and data flow diagrams.
• Input/Output Design: During this phase, the inputs and outputs of
the system are designed, including the user interface and reports.
• Structured Design: During the Structured Design phase, the system
is designed to meet the requirements gathered in the Structured
Analysis phase. This may include selecting appropriate hardware
and software platforms, designing databases, and defining data
structures.
• Implementation and Testing: Once the design is complete, the
system is implemented and tested.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy