o ops concepts

25
06/06/22 Amandeep S. Patti 1 Object Oriented Analysis & Design MCA 405-C (N2)

Upload: anand-grewal

Post on 06-Dec-2014

756 views

Category:

Education


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: O ops concepts

04/10/23 Amandeep S. Patti 1

Object Oriented Analysis & Design

MCA 405-C (N2)

Page 2: O ops concepts

04/10/23 Amandeep S. Patti 2

What is Object-Orientation? - Object

An "object" is anything to which a concept applies.A "concept" is an idea or notion that we apply to the things, or objects,

in our awareness

Thing drawn from the problem domain or solution space. E.g., a living person in the problem domain, a software component in the

solution space.

A structure that

- has identity (i.e., discrete and distinguishable), and

- bundles together attributes (the data part, or state) and behavior (the function/code part).

It is an instance of a collective concept, i.e., a class.

Page 3: O ops concepts

04/10/23 Amandeep S. Patti 3

Properties of an object Attribute: A characteristic of an object that has

value in the context of the system Method: How an object allows other objects to

interact with it Method overloading: When a method name is used for

different reasons in the same scope, the method is overloaded

State: a condition during the life of an object

Page 4: O ops concepts

04/10/23 Amandeep S. Patti 4

What is Object-Orientation?- Class

A collection of objects with the same data structure (attributes, state variables) and behavior (function/code/operations) in the solution space.

A blueprint or definition of objects. Classification

Grouping of common objects into a class Instance

An object created by a class. Instantiation

The act of creating an instance.

Page 5: O ops concepts

04/10/23 Amandeep S. Patti 5

Describing a class Why does a class exist? What is it relevance to others? What are the attributes? What are its methods?

Page 6: O ops concepts

04/10/23 Amandeep S. Patti 6

Fundamentals of Object Orientation

Data Abstraction and Encapsulation Inheritance Polymorphism

Page 7: O ops concepts

04/10/23 Amandeep S. Patti 7

Data Abstraction and Encapsulation

Data Abstraction is defined as extracting from the abundance of information-related data. It is important that related data be kept together for easier manipulation. It is equally important to abstract the generic data from specific details.

Encapsulation is defined as hiding related data behind an interface of methods. These methods allow access to the data and manipulations to be performed on the data.

Page 8: O ops concepts

04/10/23 Amandeep S. Patti 8

Data Abstraction and Encapsulation

Attributes

Attributes

Manipulate data values

Set data values Get data values

Page 9: O ops concepts

04/10/23 Amandeep S. Patti 9

Focus on the essential.Focus on what an object “is and does”.Omits tremendous amount of details.Must always be for some purpose, because purpose determines what is and what is not important.Many abstractions of the same thing are possible.All abstractions are incomplete and inaccurate.A good model captures the crucial aspects of a problem and omits the others.

Abstraction

Page 10: O ops concepts

04/10/23 Amandeep S. Patti 10

Class Car

Attributes Model Location

Operations Start Accelerate

Example of Abstraction

Page 11: O ops concepts

04/10/23 Amandeep S. Patti 11

Inheritance Inheritance brings properties that are

common across several classes into one general class. This class then becomes the parent class to more specific class or child class.

Two types. Derived inheritance. Abstracted inheritance.

Page 12: O ops concepts

04/10/23 Amandeep S. Patti 12

Polymorphism There are two possible definitions for the

term polymorphism Different classes supporting the same method

(overriding) An object supports multiple interface.

Page 13: O ops concepts

04/10/23 Amandeep S. Patti 13

Overriding The mechanism by which a child class can

provide an alternative implementation of a method currently provided by a parent class.

Page 14: O ops concepts

04/10/23 Amandeep S. Patti 14

What Is Object Oriented Development?

It’s a new way of thinking about software based on abstractions that exist in the real world.

The essence of object-oriented development is the identification and organization of application-domain concepts, rather than their final representation in a programming language.

Page 15: O ops concepts

04/10/23 Amandeep S. Patti 15

It is only when the inherent concepts of the application are identified, organized and understood that the details of data structures and functions can be addressed effectively.

What Is Object Oriented Development?

Page 16: O ops concepts

04/10/23 Amandeep S. Patti 16

How It Is Different From Functional Methodology?

In functional methodology, emphasis on specifying and decomposing system functionality. If requirements changes, the system may require massive changes.

Object oriented approach focuses first on identifying objects from the application domain, then fitting procedures around them.

Page 17: O ops concepts

04/10/23 Amandeep S. Patti 17

What Is OOAD? Analysis — understanding, finding and

describing concepts in the problem domain. Design — understanding and defining software

solution/objects that represent the analysis concepts and will eventually be implemented in code.

OOAD —A software development approach that emphasizes a logical solution based on objects.

Page 18: O ops concepts

04/10/23 Amandeep S. Patti 18

What Is OOAD? Object-orientation

Allows users to fully understand the environment they are attempting to model

OOAD is an OO methodology for analyzing and designing a system. It is not necessarily relevant to any programming language, even it may be irrelevant to any programming task. It is the recognition methodology to understand the world.

In this sense OOP is the application of OOAD to software programming tasks

Page 19: O ops concepts

04/10/23 Amandeep S. Patti 19

The fundamental construct is the object, which combines both data structure and behaviour in a single entity.

Object oriented models are useful for understanding problems, communicating with application experts, modeling enterprises, preparing documents and designing programs and databases.

What Is OOAD?

Page 20: O ops concepts

04/10/23 Amandeep S. Patti 20

What Is a Model? A model is a simplification of reality. E.g., a miniature bridge for a real bridge to be built A model is our simplification of our

perception of reality (that is, if it exists, otherwise it could be a mere illusion).

A model is an abstraction (omitting tremendous amount of details) of something for the purpose of understanding, be it the problem or a solution.

Page 21: O ops concepts

04/10/23 Amandeep S. Patti 21

Three Models Object model- describes the static structure of

the objects in a system and their relationships. It contains object diagrams.

Dynamic model- describes the aspects of a system that change over time. It is used to specify and implement the control aspects of a system.

Functional model- describes the data value transformation within a system. It contains DFD. DFD represents a computation.

Page 22: O ops concepts

04/10/23 Amandeep S. Patti 22

Object Model It provides the essential framework into

which the dynamic and functional models can be placed.

Changes and transformations are meaningless unless there is something to be changed or transformed.

Page 23: O ops concepts

04/10/23 Amandeep S. Patti 23

Dynamic Model Describes those aspects of a system concerned

with the time and the sequencing of operations- events that mark changes, sequences of events, states that define the context for events and the organisation of events and states.

It describes the sequences of operations that occur, without regard for what they operations do, what they operate on, or how they are implemented.

Page 24: O ops concepts

04/10/23 Amandeep S. Patti 24

Functional Model Describes those aspects of a system

concerned with transformations of values- functions, mappings, constraints and functional dependencies.

The functional model captures what a system does, without regard for how and when it is done.

Page 25: O ops concepts

04/10/23 Amandeep S. Patti 25

Systems Engineering

Requirements Analysis

Project Planning

Architectural Design

Detailed Design

Implementation

Release

Maintenance

Quality A

ssurance

Software Lifecycle Review

How to Do OOAD