SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Object Oriented Analysis & Design (OOAD)
Unit-I
Chapter – 2
Object Basics
2.1 Introduction
• Understand Object by an example
• Car  Object ( Real World Entity)
• Properties
• Methods
What is object orientation?
• Object Oriented (OO) means that we organize software
as a collection of discrete objects that incorporate both
data structure & behavior.
• OO approach its generally include four aspects:
1. Identity
2. Classification
3. Inheritance
4. Polymorphism
• Identity means that data is quantized into discrete,
distinguishable entities called objects.
• Each object has its own inherent identity.
• In other words, two objects are distinct even if all their
attributes values (such as name and size) are identical.
• The white queen in a chess game for example of
objects.
Identity
Objects can be:
• External Entity (e.g., other systems, devices, people)
that produce or consume information to be used by
system
• Things (e.g., reports, displays, letters, signals) that are
part of information domain for the problem
• Places (e.g., book’s room) that establish the context of
the problem and the overall function of the system.
• Organizational units (e.g., division, group, team,
department) that are relevant to an application,
• Transaction (e.g., loan, take course, buy, order).
How to identify object?
6
Object Identity Behaviors State
An employee “Mr. John” Join(),
Retire()
Joined,
Retired.
A book “Book with title
Object Oriented
Analysis Design”
Add Exemplar, Rent,
available,
reserved
A sale “Sale no 0015,
15/12/98”
SendInvoiced(),
Cancel().
Invoiced,
cancelled.
Object
What is classification?
• Classification means that objects with the same data
structure (attributes) and behavior (operations) are
grouped into a class.
• For example Paragraph, Monitor & Chess Piece.
• Class is a collection of objects.
• A Class is an abstraction that describes properties
important to an application and ignores the rest.
• Any choice of classes is arbitrary and depends on the
applications.
• For example,
Fruit mango, apple, banana…etc.
Classification
• Each Class describes a possibly infinite set of individual
objects.
• Each object is said to be an instance of its class.
• An object has its own value for each attribute but
shares the attribute names and operations with other
instances of the class.
What is Inheritance?
3. Inheritance :
• Inheritance is the process, in which one object can use the properties
of another object.
• It allows the declaration and implementation of one class to based an
existing class.
• The concept of inheritance provides the idea of reusability..
Parent Base or Super class
Child Derived or Sub class
Parent +
Child
features
Parent
features
Inheritance
• Inheritance is the sharing of attributes and operations
(features) among classes based on a hierarchical
relationship.
• A Super class has general information that subclasses
refine and elaborate.
• Each subclass incorporates, or inherits, all the features
of its super class and adds its own unique features.
• Subclasses need not repeat the features of the super
class.
• For example, Scrolling Window and Fixed Window are
subclasses of Window.
Inheritance
• Both subclasses inherit the features of Window, such as
a visible region on the screen.
• Scrolling Window adds a scroll bar and an offset.
• The ability to factor out common features of several
classes into a super class can greatly reduce repetition
within designs and programs and is one of the main
advantages of OO technology.
Bird
Flying Bird Non Flying Bird
What is Polymorphism?
• Polymorphism means the ability to take more than one
form.
• It allows a single name to be used for more than one
related purpose.
• It can be also defined as the property that allows an
operation to have different behavior on different objects.
Shape
SquareCircle
name
getName( )
calculateArea( )
side
calculateArea( )
radius
calculateArea( )
What is Polymorphism?
• An operations is a procedure or transformation that an
object perform is subject to.
• For example ,
Polygon objects ---------- Polygon class
Attributes
-vertices
-border color
-fill color
Operations
-draw
-erase
-move
Polymorphism
• An implementation of an operation by a specific class is
called a method.
• Because an OO operator is polymorphic, it may have more
than one method implementing it, each for a different
class of object.
Abstraction
• Abstraction is the selective examination of certain
aspects of a problem.
• Creating new data types using encapsulated items is
known as data abstraction.
• It is also the process of grouping the attributes and
functions to operate these attributes.
• And the data type created by the data abstraction are
known as Abstract Data Types (ADT).
• Attributes : is known as data members.
Abstraction
• Abstraction is the presentation of simple concept (or
object) to the external world.
• Abstraction concept is to describe a set of similar
concrete entities.
• It focuses on the essential, inherent aspects of an entity
and ignoring its accidental properties.
• The abstraction concept is usually used during analysis:
deciding only with application-domain concepts, not
making design and implementation decisions.
Abstraction
• Two popular abstractions: procedure abstraction and
data abstraction.
• Procedure abstraction is to decompose problem to many
simple sub-works.
• Data abstraction is to collect essential elements
composing to a compound data.
• These two abstractions have the same objective:
reusable and replaceable.
Abstraction
• Below figure shows an example of data abstraction to
abstract doors as a data structure with essential
properties.
• Example of Data Abstraction.
Three Models
• We use three kinds of models to describe a system
from different viewpoints:
1. Class Model
2. State Model
3. Interaction Model
• Class Model: For the objects in the system & their
relationships.
• State Model: For the life history of objects.
• Interaction Model: For the interactions among objects.
Class Model
1. Class Model:
• For the objects in the system & their relationships.
• The class model defines the context for software development –
the universe of discourse.
• The class model contains class diagrams.
• A class diagram is a graph whose nodes are classes and whose
arcs relationships among classes.
Class Model
• For example,
State Model
2. State Model:
• For the life history of objects.
• The state model specifies and implements control with
state diagrams.
• A state diagram is a graph whose nodes are states and
whose arcs are transitions between states caused by
events.
Interaction Model
3. Interaction Model:
• For the interactions among objects.
• The interaction model start with use case with activity
and sequence diagram.
• A use case focuses on the functionality of a system – that
is, what a system does for users.
• A sequence diagram shows the objects that interact and
the time sequence of their interactions.
• An activity diagram elaborates important processing
steps.
Interaction Model
• Use cases ,sequence diagrams, and activity diagrams
document the interaction model.
• Use cases document major themes for interaction
between the system and outside actors.
• Sequence diagrams show the objects that interact and
the time sequence of their interactions
• Activity diagrams show the floe of control among the
processing steps of a computations.
Modeling
• A model is an abstraction of something for the purpose of
understanding it before building it.
a) Testing a physical entity before building it.
b) Communication with customers.
c) Visualization.
d) Reduction of complexity.
Relationship Among the Models
• Each models describes one aspect of the system but
contains references to the other models.
• The class model describes data structure on which the state
and interaction models operate.
• The operations in the class model correspond to events and
actions.
• The state model describes the control structure of objects.
• It shows decisions that depend on object values and causes
actions that change object values and state.
• The interaction model focuses on the exchange between
objects and provides a holistic overview of the operation of
a system.
TEXTBOOK EXERCISES
1.5)All objects have identity and are distinguishable. However,
for large collections of objects, it may not be a trivial matter
to devise a scheme to distinguish them. Furthermore, a
scheme may depend on the purpose of the distinction. For
each of the
following collections of objects, describe how they could be
distinguished:
TEXTBOOK EXERCISES
• a . All persons in the world for the purpose of sending mail.
Country; state or province; city; street and number;
apartment, suite, or mail drop; name (ie, USA ->
Florida -> Orlando -> 633 N Orange Ave -> Mail Point 85 ->
Mark Zieg)
• b . All persons in the world for the purpose of criminal
investigations.
Known aliases, fingerprints, photo, results of restriction-
enzyme DNA tests (ie, Andrew Wiggen, AKA Ender Wiggen,
AKA Xenocide)
TEXTBOOK EXERCISES
• c . All customers with safe deposit boxes in a given bank.
Box number (ie, 1258)
• d . All telephones in the world for making telephone calls.
National code, local exchange (area code), local number (ie, 10-
104 (407) 420-6072)
• e . All customers of a telephone company for billing purposes.
Area code, telephone number (ie, (407) 420-6072)
• f . All electronic mail addresses throughout the world.
Server domain or IP, account name (ie,
mzieg@orlandosentinel.com)
• g . All employees of a company to restrict access for security
purposes.
Department; clearance level; name, social security number, or
employee number (ie, SYSTEMS-L15- 2072)
• A variable length array would make effective use of the following operations:
append, copy, count, delete, index, insert, and update. The only operation
which wouldn’t make a great deal of sense would be intersect. The append
operation makes sense because the ordered nature of the array presupposes
a ‘beginning’ and an ‘end’. The append operation would allow object users to
easily add something to the end of the array, in the manner of a queue or
other common data structure. Copy makes sense with any object, because
multiple object instantiations are frequently found in many common
applications. Count makes since because it provides a bound to the index
range, although the question didn’t specifically mention that the indexes had
to be sequential or positive values. Delete is another natural operation,
especially when parameterized with a beginning, end, or [index] indicator.
Index would be essential in order to access various elements. Insert would be
a more flexible version of append, and indeed under some interfaces render it
unnecessary. Update would be important in any application in which data
needed to be modified without going through a delete/insert sequence.
Intersect could readily be provided if really desired, but I haven’t had much
call do use such an operation on an ordered array.
• A symbol table uses a somewhat smaller set of operations. Here, copy,
delete, intersect, and update are the most likely candidates. Again, copy is
universally popular. Update, in the sense of an unordered insert, would be
necessary to propagate the table, and delete would be necessary to
• flush unnecessary values. Intersect somehow sounds more likely for this
class than for array,
• because you certainly need to compare elements of symbol tables when
linking libraries and object
• code. Some sort of operation to retrieve or read an entry would also be
necessary, although I
• wouldnÕt call it Òindex,Ó which suggests an ordered position rather than a
key value. Append,
• index, and the ordered insert make less sense because they provide
implementation-specific details
• which arenÕt necessary and contradict the tenets of OOD. Count could
perhaps be useful in certain
• systems, but many could do perfectly well without it.
• Finally a set could use copy, count, delete, intersect, and update
operationsÑalmost the same list
• as a symbol table, and for similar reasons. Copy is universal (as long as you
give due credit to
• your source :-) Update (unordered insert) and delete are fundamental to
all collections, and count is
• just plain handy to have around. Once again, some sort of read or retrieve
operation would be nice
• to have available, but index has all the wrong connotations. You could
have ÒdeleteÓ return an
• item, I suppose. On the other hand, append, index, and insert violate the
premise of
• Òunorderedness.Ó And having a set class without intersect (as well as
union) just wouldnÕt be
• proper.

Weitere ähnliche Inhalte

Was ist angesagt?

Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)Manoj Reddy
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentRishabh Soni
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)Manoj Reddy
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineeringMubashir Jutt
 
1. introduction to uml
1. introduction to uml1. introduction to uml
1. introduction to umlPRABU M
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction ModelingHemant Sharma
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagramAsraa Batool
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagramsAjit Nayak
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Domain class model
Domain class modelDomain class model
Domain class modelshekharsj
 

Was ist angesagt? (20)

CS8592-OOAD Lecture Notes Unit-5
CS8592-OOAD Lecture Notes Unit-5 CS8592-OOAD Lecture Notes Unit-5
CS8592-OOAD Lecture Notes Unit-5
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Ooad presentatin crc cards
Ooad presentatin crc cardsOoad presentatin crc cards
Ooad presentatin crc cards
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
1. introduction to uml
1. introduction to uml1. introduction to uml
1. introduction to uml
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Software Engineering :UML class diagrams
Software Engineering :UML class diagramsSoftware Engineering :UML class diagrams
Software Engineering :UML class diagrams
 
Class based modeling
Class based modelingClass based modeling
Class based modeling
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Domain class model
Domain class modelDomain class model
Domain class model
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2
 
Ooad
OoadOoad
Ooad
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 

Ähnlich wie Ooad ch 2

10-System-ModelingFL22-sketch-19122022-091234am.pptx
10-System-ModelingFL22-sketch-19122022-091234am.pptx10-System-ModelingFL22-sketch-19122022-091234am.pptx
10-System-ModelingFL22-sketch-19122022-091234am.pptxhuzaifaahmed79
 
Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)riarana10
 
Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Ganapathi M
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)MD Sulaiman
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxelsagalgao
 
Handout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and DesignHandout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and DesignSAFAD ISMAIL
 
8 oo approach&uml-23_feb
8 oo approach&uml-23_feb8 oo approach&uml-23_feb
8 oo approach&uml-23_febRaj Shah
 
Object Modelling Technique " ooad "
Object Modelling Technique  " ooad "Object Modelling Technique  " ooad "
Object Modelling Technique " ooad "AchrafJbr
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfBhanuJatinSingh
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iTaymoor Nazmy
 
MODELLING WITH OBJECTS.pptx
MODELLING WITH OBJECTS.pptxMODELLING WITH OBJECTS.pptx
MODELLING WITH OBJECTS.pptxTarun710971
 

Ähnlich wie Ooad ch 2 (20)

Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
 
10-System-ModelingFL22-sketch-19122022-091234am.pptx
10-System-ModelingFL22-sketch-19122022-091234am.pptx10-System-ModelingFL22-sketch-19122022-091234am.pptx
10-System-ModelingFL22-sketch-19122022-091234am.pptx
 
Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)Software enginering.group-no-11 (1)
Software enginering.group-no-11 (1)
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0
 
Analysis
AnalysisAnalysis
Analysis
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
80410172053.pdf
80410172053.pdf80410172053.pdf
80410172053.pdf
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
 
Handout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and DesignHandout on Object orienetd Analysis and Design
Handout on Object orienetd Analysis and Design
 
8 oo approach&uml-23_feb
8 oo approach&uml-23_feb8 oo approach&uml-23_feb
8 oo approach&uml-23_feb
 
Object Modelling Technique " ooad "
Object Modelling Technique  " ooad "Object Modelling Technique  " ooad "
Object Modelling Technique " ooad "
 
OOP Presentation.pptx
OOP Presentation.pptxOOP Presentation.pptx
OOP Presentation.pptx
 
OOP Presentation.pptx
OOP Presentation.pptxOOP Presentation.pptx
OOP Presentation.pptx
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
 
4-OOPS.pptx
4-OOPS.pptx4-OOPS.pptx
4-OOPS.pptx
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 
07 intro2 oop
07 intro2 oop07 intro2 oop
07 intro2 oop
 
MODELLING WITH OBJECTS.pptx
MODELLING WITH OBJECTS.pptxMODELLING WITH OBJECTS.pptx
MODELLING WITH OBJECTS.pptx
 
O6u CS-315A OOP Lecture (1).pdf
O6u CS-315A OOP Lecture (1).pdfO6u CS-315A OOP Lecture (1).pdf
O6u CS-315A OOP Lecture (1).pdf
 

Mehr von anujabeatrice2

Mehr von anujabeatrice2 (6)

Chapter 8 ooad
Chapter  8 ooadChapter  8 ooad
Chapter 8 ooad
 
Chapter 7 ooad
Chapter 7 ooadChapter 7 ooad
Chapter 7 ooad
 
Ooad ch 5
Ooad ch 5Ooad ch 5
Ooad ch 5
 
Ooad ch 4
Ooad ch 4Ooad ch 4
Ooad ch 4
 
Ooad ch 3
Ooad ch 3Ooad ch 3
Ooad ch 3
 
Ooad ch 6
Ooad ch 6Ooad ch 6
Ooad ch 6
 

Kürzlich hochgeladen

Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 

Kürzlich hochgeladen (20)

Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

Ooad ch 2

  • 1. Object Oriented Analysis & Design (OOAD) Unit-I Chapter – 2 Object Basics
  • 2. 2.1 Introduction • Understand Object by an example • Car  Object ( Real World Entity) • Properties • Methods
  • 3. What is object orientation? • Object Oriented (OO) means that we organize software as a collection of discrete objects that incorporate both data structure & behavior. • OO approach its generally include four aspects: 1. Identity 2. Classification 3. Inheritance 4. Polymorphism
  • 4. • Identity means that data is quantized into discrete, distinguishable entities called objects. • Each object has its own inherent identity. • In other words, two objects are distinct even if all their attributes values (such as name and size) are identical. • The white queen in a chess game for example of objects. Identity
  • 5. Objects can be: • External Entity (e.g., other systems, devices, people) that produce or consume information to be used by system • Things (e.g., reports, displays, letters, signals) that are part of information domain for the problem • Places (e.g., book’s room) that establish the context of the problem and the overall function of the system. • Organizational units (e.g., division, group, team, department) that are relevant to an application, • Transaction (e.g., loan, take course, buy, order). How to identify object?
  • 6. 6 Object Identity Behaviors State An employee “Mr. John” Join(), Retire() Joined, Retired. A book “Book with title Object Oriented Analysis Design” Add Exemplar, Rent, available, reserved A sale “Sale no 0015, 15/12/98” SendInvoiced(), Cancel(). Invoiced, cancelled. Object
  • 7. What is classification? • Classification means that objects with the same data structure (attributes) and behavior (operations) are grouped into a class. • For example Paragraph, Monitor & Chess Piece. • Class is a collection of objects. • A Class is an abstraction that describes properties important to an application and ignores the rest. • Any choice of classes is arbitrary and depends on the applications. • For example, Fruit mango, apple, banana…etc.
  • 8. Classification • Each Class describes a possibly infinite set of individual objects. • Each object is said to be an instance of its class. • An object has its own value for each attribute but shares the attribute names and operations with other instances of the class.
  • 9. What is Inheritance? 3. Inheritance : • Inheritance is the process, in which one object can use the properties of another object. • It allows the declaration and implementation of one class to based an existing class. • The concept of inheritance provides the idea of reusability.. Parent Base or Super class Child Derived or Sub class Parent + Child features Parent features
  • 10. Inheritance • Inheritance is the sharing of attributes and operations (features) among classes based on a hierarchical relationship. • A Super class has general information that subclasses refine and elaborate. • Each subclass incorporates, or inherits, all the features of its super class and adds its own unique features. • Subclasses need not repeat the features of the super class. • For example, Scrolling Window and Fixed Window are subclasses of Window.
  • 11. Inheritance • Both subclasses inherit the features of Window, such as a visible region on the screen. • Scrolling Window adds a scroll bar and an offset. • The ability to factor out common features of several classes into a super class can greatly reduce repetition within designs and programs and is one of the main advantages of OO technology. Bird Flying Bird Non Flying Bird
  • 12. What is Polymorphism? • Polymorphism means the ability to take more than one form. • It allows a single name to be used for more than one related purpose. • It can be also defined as the property that allows an operation to have different behavior on different objects. Shape SquareCircle name getName( ) calculateArea( ) side calculateArea( ) radius calculateArea( )
  • 13. What is Polymorphism? • An operations is a procedure or transformation that an object perform is subject to. • For example , Polygon objects ---------- Polygon class Attributes -vertices -border color -fill color Operations -draw -erase -move
  • 14. Polymorphism • An implementation of an operation by a specific class is called a method. • Because an OO operator is polymorphic, it may have more than one method implementing it, each for a different class of object.
  • 15. Abstraction • Abstraction is the selective examination of certain aspects of a problem. • Creating new data types using encapsulated items is known as data abstraction. • It is also the process of grouping the attributes and functions to operate these attributes. • And the data type created by the data abstraction are known as Abstract Data Types (ADT). • Attributes : is known as data members.
  • 16. Abstraction • Abstraction is the presentation of simple concept (or object) to the external world. • Abstraction concept is to describe a set of similar concrete entities. • It focuses on the essential, inherent aspects of an entity and ignoring its accidental properties. • The abstraction concept is usually used during analysis: deciding only with application-domain concepts, not making design and implementation decisions.
  • 17. Abstraction • Two popular abstractions: procedure abstraction and data abstraction. • Procedure abstraction is to decompose problem to many simple sub-works. • Data abstraction is to collect essential elements composing to a compound data. • These two abstractions have the same objective: reusable and replaceable.
  • 18. Abstraction • Below figure shows an example of data abstraction to abstract doors as a data structure with essential properties. • Example of Data Abstraction.
  • 19. Three Models • We use three kinds of models to describe a system from different viewpoints: 1. Class Model 2. State Model 3. Interaction Model • Class Model: For the objects in the system & their relationships. • State Model: For the life history of objects. • Interaction Model: For the interactions among objects.
  • 20. Class Model 1. Class Model: • For the objects in the system & their relationships. • The class model defines the context for software development – the universe of discourse. • The class model contains class diagrams. • A class diagram is a graph whose nodes are classes and whose arcs relationships among classes.
  • 22. State Model 2. State Model: • For the life history of objects. • The state model specifies and implements control with state diagrams. • A state diagram is a graph whose nodes are states and whose arcs are transitions between states caused by events.
  • 23. Interaction Model 3. Interaction Model: • For the interactions among objects. • The interaction model start with use case with activity and sequence diagram. • A use case focuses on the functionality of a system – that is, what a system does for users. • A sequence diagram shows the objects that interact and the time sequence of their interactions. • An activity diagram elaborates important processing steps.
  • 24. Interaction Model • Use cases ,sequence diagrams, and activity diagrams document the interaction model. • Use cases document major themes for interaction between the system and outside actors. • Sequence diagrams show the objects that interact and the time sequence of their interactions • Activity diagrams show the floe of control among the processing steps of a computations.
  • 25. Modeling • A model is an abstraction of something for the purpose of understanding it before building it. a) Testing a physical entity before building it. b) Communication with customers. c) Visualization. d) Reduction of complexity.
  • 26. Relationship Among the Models • Each models describes one aspect of the system but contains references to the other models. • The class model describes data structure on which the state and interaction models operate. • The operations in the class model correspond to events and actions. • The state model describes the control structure of objects. • It shows decisions that depend on object values and causes actions that change object values and state. • The interaction model focuses on the exchange between objects and provides a holistic overview of the operation of a system.
  • 27. TEXTBOOK EXERCISES 1.5)All objects have identity and are distinguishable. However, for large collections of objects, it may not be a trivial matter to devise a scheme to distinguish them. Furthermore, a scheme may depend on the purpose of the distinction. For each of the following collections of objects, describe how they could be distinguished:
  • 28. TEXTBOOK EXERCISES • a . All persons in the world for the purpose of sending mail. Country; state or province; city; street and number; apartment, suite, or mail drop; name (ie, USA -> Florida -> Orlando -> 633 N Orange Ave -> Mail Point 85 -> Mark Zieg) • b . All persons in the world for the purpose of criminal investigations. Known aliases, fingerprints, photo, results of restriction- enzyme DNA tests (ie, Andrew Wiggen, AKA Ender Wiggen, AKA Xenocide)
  • 29. TEXTBOOK EXERCISES • c . All customers with safe deposit boxes in a given bank. Box number (ie, 1258) • d . All telephones in the world for making telephone calls. National code, local exchange (area code), local number (ie, 10- 104 (407) 420-6072) • e . All customers of a telephone company for billing purposes. Area code, telephone number (ie, (407) 420-6072) • f . All electronic mail addresses throughout the world. Server domain or IP, account name (ie, mzieg@orlandosentinel.com) • g . All employees of a company to restrict access for security purposes. Department; clearance level; name, social security number, or employee number (ie, SYSTEMS-L15- 2072)
  • 30. • A variable length array would make effective use of the following operations: append, copy, count, delete, index, insert, and update. The only operation which wouldn’t make a great deal of sense would be intersect. The append operation makes sense because the ordered nature of the array presupposes a ‘beginning’ and an ‘end’. The append operation would allow object users to easily add something to the end of the array, in the manner of a queue or other common data structure. Copy makes sense with any object, because multiple object instantiations are frequently found in many common applications. Count makes since because it provides a bound to the index range, although the question didn’t specifically mention that the indexes had to be sequential or positive values. Delete is another natural operation, especially when parameterized with a beginning, end, or [index] indicator. Index would be essential in order to access various elements. Insert would be a more flexible version of append, and indeed under some interfaces render it unnecessary. Update would be important in any application in which data needed to be modified without going through a delete/insert sequence. Intersect could readily be provided if really desired, but I haven’t had much call do use such an operation on an ordered array.
  • 31. • A symbol table uses a somewhat smaller set of operations. Here, copy, delete, intersect, and update are the most likely candidates. Again, copy is universally popular. Update, in the sense of an unordered insert, would be necessary to propagate the table, and delete would be necessary to • flush unnecessary values. Intersect somehow sounds more likely for this class than for array, • because you certainly need to compare elements of symbol tables when linking libraries and object • code. Some sort of operation to retrieve or read an entry would also be necessary, although I • wouldnÕt call it Òindex,Ó which suggests an ordered position rather than a key value. Append, • index, and the ordered insert make less sense because they provide implementation-specific details • which arenÕt necessary and contradict the tenets of OOD. Count could perhaps be useful in certain • systems, but many could do perfectly well without it.
  • 32. • Finally a set could use copy, count, delete, intersect, and update operationsÑalmost the same list • as a symbol table, and for similar reasons. Copy is universal (as long as you give due credit to • your source :-) Update (unordered insert) and delete are fundamental to all collections, and count is • just plain handy to have around. Once again, some sort of read or retrieve operation would be nice • to have available, but index has all the wrong connotations. You could have ÒdeleteÓ return an • item, I suppose. On the other hand, append, index, and insert violate the premise of • Òunorderedness.Ó And having a set class without intersect (as well as union) just wouldnÕt be • proper.