SlideShare a Scribd company logo
Object Oriented Concepts
      Thinking Object’s way




                        -Sanjay Gadge
                  (sgadge@gmail.com)
What is Object?
What is Object?
• Tangible entity and close to real world
• It has state and behavior
• It has responsibilities, it has to adhere to
• It expects respect from rest of the world
• It provides services to other objects
• World is collection of collaborating entities
  called “objects”
• Object is born and it has to die
OO Paradigm



         •   Encapsulation
         •   Abstraction
         •   Inheritance
         •   Polymorphism
         •   Composition
Abstraction
• An abstraction denotes the essential
  characteristics of an object that distinguish it
  from all other kinds of objects and thus
  provide crisply defined conceptual
  boundaries, relative to the perspective of
  the viewer
• Focuses upon the observable behavior of the
  object
Abstraction
• Abstraction provides reusability
• More generic than specific
  – “Take me to airport” Vs “Turn Left”, “Turn Right”,
    “Start”, “Stop”
• Abstraction provides a mean to divide and
  conquer problem statement
• Abstraction helps in pattern identification
• Abstract classes and Interfaces
Encapsulation
Encapsulation means:
• Information hiding
• Hiding details : Don’t tell me how do you do
  it, just do it.
Encapsulation
• An object should only expose the services required to interact
  with it. Details not important to the user of the object should
  be hidden
• Services are implemented by the object
• # of services should be kept minimal
• Any local changes (algorithm/data) will not affect the service
  provided. This makes system resilient.
• Services provided by the object should be seen as a contract
  between user-of-the-object and object-under-discussion. Both
  the parties should honor the contract.
• The scope of data manipulation code is limited to the object
  thus provides better control on the data.
• Give the user objects only what they absolutely needs
• Services are exposed as “public” access-modifier
Inheritance
• “Is-a” relationship
• Helps in code/services reuse
• Helps in locating the common code at one
  place hence a common change can be
  applied at one place only. Hence less
  maintenance efforts & increased readability
• Base class services can be used as-it-is or
  can be overridden
Polymorphism
• Literal meaning: many                              Shape
                                                     {
  shapes                                             }
                                                             public void Draw();


• Provides analogous          Circle                                   Rectangle
  interface (with different   {
                                       public void Draw()
                                                                       {
                                                                              public void Draw()

  implementation) to                   {
                                       }
                                                                              {
                                                                              }

  users of object
                              }                                        }



• Polymorphism-
  Abstraction-inheritance
  often go hand in hand
Using “private, public, protected”
wisely
Private
• Internal to object
   – Class level variables
   – Sub routines
• Does not make much sense out side the object boundaries
   – Helper methods
• Needs to be secured/shielded from out side world
   – Variables holding important information crucial for algorithms and
     values needs to be checked before assigning/setting
• Contributes to the stable-state of the object
   – Object attributes
………Using “private, protected, public”
wisely
Protected
• Internal to object and its derived objects and Does not make
  much sense out side the object boundaries but may be
  assessed by derived objects
   – Helper methods


Public
• Only meant for out side world
• Mostly represent the services provided by object
• Can be overridden by derived objects
Thank you!

More Related Content

Similar to Software Development - Thinking Object's Way

COMP 4010 Lecture 9 AR Interaction
COMP 4010 Lecture 9 AR InteractionCOMP 4010 Lecture 9 AR Interaction
COMP 4010 Lecture 9 AR Interaction
Mark Billinghurst
 
Better Understanding OOP using C#
Better Understanding OOP using C#Better Understanding OOP using C#
Better Understanding OOP using C#
Chandan Gupta Bhagat
 
this is the concept in C++ under object oriented programming language "POLYMO...
this is the concept in C++ under object oriented programming language "POLYMO...this is the concept in C++ under object oriented programming language "POLYMO...
this is the concept in C++ under object oriented programming language "POLYMO...
sj9399037128
 
Design Pattern lecture 3
Design Pattern lecture 3Design Pattern lecture 3
Design Pattern lecture 3
Julie Iskander
 
OOPS features using Objective C
OOPS features using Objective COOPS features using Objective C
OOPS features using Objective C
Tiyasi Acharya
 
08lexi.pdf
08lexi.pdf08lexi.pdf
Object-oriented Basics
Object-oriented BasicsObject-oriented Basics
Object-oriented Basics
Jamie (Taka) Wang
 
2016 AR Summer School Lecture3
2016 AR Summer School Lecture32016 AR Summer School Lecture3
2016 AR Summer School Lecture3
Mark Billinghurst
 
Ceylon - the language and its tools
Ceylon - the language and its toolsCeylon - the language and its tools
Ceylon - the language and its tools
Max Andersen
 
Oops concept
Oops conceptOops concept
Bridge Design Pattern
Bridge Design PatternBridge Design Pattern
Bridge Design Pattern
Shahriar Hyder
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and Objects
Mohammad Shaker
 
Interface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar SinghInterface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar Singh
dheeraj_cse
 
Software Development: Beyond Training wheels
Software Development: Beyond Training wheelsSoftware Development: Beyond Training wheels
Software Development: Beyond Training wheels
Naveenkumar Muguda
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
kabirmahlotra
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
kabirmahlotra
 
COMP 4010 Lecture9 AR Interaction
COMP 4010 Lecture9 AR InteractionCOMP 4010 Lecture9 AR Interaction
COMP 4010 Lecture9 AR Interaction
Mark Billinghurst
 
Chapter 17 corba
Chapter 17 corbaChapter 17 corba
Chapter 17 corba
AbDul ThaYyal
 
2CPP14 - Abstraction
2CPP14 - Abstraction2CPP14 - Abstraction
2CPP14 - Abstraction
Michael Heron
 
Implementation of interface9 cm604.30
Implementation of interface9 cm604.30Implementation of interface9 cm604.30
Implementation of interface9 cm604.30
myrajendra
 

Similar to Software Development - Thinking Object's Way (20)

COMP 4010 Lecture 9 AR Interaction
COMP 4010 Lecture 9 AR InteractionCOMP 4010 Lecture 9 AR Interaction
COMP 4010 Lecture 9 AR Interaction
 
Better Understanding OOP using C#
Better Understanding OOP using C#Better Understanding OOP using C#
Better Understanding OOP using C#
 
this is the concept in C++ under object oriented programming language "POLYMO...
this is the concept in C++ under object oriented programming language "POLYMO...this is the concept in C++ under object oriented programming language "POLYMO...
this is the concept in C++ under object oriented programming language "POLYMO...
 
Design Pattern lecture 3
Design Pattern lecture 3Design Pattern lecture 3
Design Pattern lecture 3
 
OOPS features using Objective C
OOPS features using Objective COOPS features using Objective C
OOPS features using Objective C
 
08lexi.pdf
08lexi.pdf08lexi.pdf
08lexi.pdf
 
Object-oriented Basics
Object-oriented BasicsObject-oriented Basics
Object-oriented Basics
 
2016 AR Summer School Lecture3
2016 AR Summer School Lecture32016 AR Summer School Lecture3
2016 AR Summer School Lecture3
 
Ceylon - the language and its tools
Ceylon - the language and its toolsCeylon - the language and its tools
Ceylon - the language and its tools
 
Oops concept
Oops conceptOops concept
Oops concept
 
Bridge Design Pattern
Bridge Design PatternBridge Design Pattern
Bridge Design Pattern
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and Objects
 
Interface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar SinghInterface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar Singh
 
Software Development: Beyond Training wheels
Software Development: Beyond Training wheelsSoftware Development: Beyond Training wheels
Software Development: Beyond Training wheels
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
COMP 4010 Lecture9 AR Interaction
COMP 4010 Lecture9 AR InteractionCOMP 4010 Lecture9 AR Interaction
COMP 4010 Lecture9 AR Interaction
 
Chapter 17 corba
Chapter 17 corbaChapter 17 corba
Chapter 17 corba
 
2CPP14 - Abstraction
2CPP14 - Abstraction2CPP14 - Abstraction
2CPP14 - Abstraction
 
Implementation of interface9 cm604.30
Implementation of interface9 cm604.30Implementation of interface9 cm604.30
Implementation of interface9 cm604.30
 

Recently uploaded

一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理
一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理
一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理
bz42w9z0
 
一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理
一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理
一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理
kohd1ci2
 
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdfADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
GregMichaelTapawan
 
一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样
k4krdgxx
 
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
hw2xf1m
 
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
qa8dk1wm
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
anthonylin333
 
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
f22b6g9c
 
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptxTOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
BAWAALEX1
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
881evgn0
 
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
9lq7ultg
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
Jaime Brown
 
一比一原版美国旧金山大学毕业证(USF学位证)如何办理
一比一原版美国旧金山大学毕业证(USF学位证)如何办理一比一原版美国旧金山大学毕业证(USF学位证)如何办理
一比一原版美国旧金山大学毕业证(USF学位证)如何办理
xnhwr8v
 
一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理
一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理
一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理
etls06p8
 
一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理
一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理
一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理
ynrtjotp
 
一比一原版(UC毕业证书)堪培拉大学毕业证如何办理
一比一原版(UC毕业证书)堪培拉大学毕业证如何办理一比一原版(UC毕业证书)堪培拉大学毕业证如何办理
一比一原版(UC毕业证书)堪培拉大学毕业证如何办理
wkip62b
 
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
k4krdgxx
 
International Upcycling Research Network advisory board meeting 4
International Upcycling Research Network advisory board meeting 4International Upcycling Research Network advisory board meeting 4
International Upcycling Research Network advisory board meeting 4
Kyungeun Sung
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
wkip62b
 
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
67n7f53
 

Recently uploaded (20)

一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理
一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理
一比一原版澳洲科廷科技大学毕业证(Curtin毕业证)如何办理
 
一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理
一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理
一比一原版(ECU毕业证)澳洲埃迪斯科文大学毕业证如何办理
 
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdfADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
 
一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样一比一原版马来西亚世纪大学毕业证成绩单一模一样
一比一原版马来西亚世纪大学毕业证成绩单一模一样
 
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
 
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
 
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
 
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptxTOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
 
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
一比一原版马里兰大学毕业证(UMD毕业证书)如何办理
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
 
一比一原版美国旧金山大学毕业证(USF学位证)如何办理
一比一原版美国旧金山大学毕业证(USF学位证)如何办理一比一原版美国旧金山大学毕业证(USF学位证)如何办理
一比一原版美国旧金山大学毕业证(USF学位证)如何办理
 
一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理
一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理
一比一原版(UWE毕业证书)西英格兰大学毕业证如何办理
 
一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理
一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理
一比一原版(爱大毕业证)美国爱荷华大学毕业证如何办理
 
一比一原版(UC毕业证书)堪培拉大学毕业证如何办理
一比一原版(UC毕业证书)堪培拉大学毕业证如何办理一比一原版(UC毕业证书)堪培拉大学毕业证如何办理
一比一原版(UC毕业证书)堪培拉大学毕业证如何办理
 
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
一比一原版(Deakin毕业证书)澳洲迪肯大学毕业证文凭如何办理
 
International Upcycling Research Network advisory board meeting 4
International Upcycling Research Network advisory board meeting 4International Upcycling Research Network advisory board meeting 4
International Upcycling Research Network advisory board meeting 4
 
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
 
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
 

Software Development - Thinking Object's Way

  • 1. Object Oriented Concepts Thinking Object’s way -Sanjay Gadge (sgadge@gmail.com)
  • 3. What is Object? • Tangible entity and close to real world • It has state and behavior • It has responsibilities, it has to adhere to • It expects respect from rest of the world • It provides services to other objects • World is collection of collaborating entities called “objects” • Object is born and it has to die
  • 4. OO Paradigm • Encapsulation • Abstraction • Inheritance • Polymorphism • Composition
  • 5. Abstraction • An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer • Focuses upon the observable behavior of the object
  • 6. Abstraction • Abstraction provides reusability • More generic than specific – “Take me to airport” Vs “Turn Left”, “Turn Right”, “Start”, “Stop” • Abstraction provides a mean to divide and conquer problem statement • Abstraction helps in pattern identification • Abstract classes and Interfaces
  • 7. Encapsulation Encapsulation means: • Information hiding • Hiding details : Don’t tell me how do you do it, just do it.
  • 8. Encapsulation • An object should only expose the services required to interact with it. Details not important to the user of the object should be hidden • Services are implemented by the object • # of services should be kept minimal • Any local changes (algorithm/data) will not affect the service provided. This makes system resilient. • Services provided by the object should be seen as a contract between user-of-the-object and object-under-discussion. Both the parties should honor the contract. • The scope of data manipulation code is limited to the object thus provides better control on the data. • Give the user objects only what they absolutely needs • Services are exposed as “public” access-modifier
  • 9. Inheritance • “Is-a” relationship • Helps in code/services reuse • Helps in locating the common code at one place hence a common change can be applied at one place only. Hence less maintenance efforts & increased readability • Base class services can be used as-it-is or can be overridden
  • 10. Polymorphism • Literal meaning: many Shape { shapes } public void Draw(); • Provides analogous Circle Rectangle interface (with different { public void Draw() { public void Draw() implementation) to { } { } users of object } } • Polymorphism- Abstraction-inheritance often go hand in hand
  • 11. Using “private, public, protected” wisely Private • Internal to object – Class level variables – Sub routines • Does not make much sense out side the object boundaries – Helper methods • Needs to be secured/shielded from out side world – Variables holding important information crucial for algorithms and values needs to be checked before assigning/setting • Contributes to the stable-state of the object – Object attributes
  • 12. ………Using “private, protected, public” wisely Protected • Internal to object and its derived objects and Does not make much sense out side the object boundaries but may be assessed by derived objects – Helper methods Public • Only meant for out side world • Mostly represent the services provided by object • Can be overridden by derived objects