SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
'                                     $




Object-Oriented Programming
        An Overview




&                                     %
                              OOP-1
'                                               $

                           Contents


• OOP and software productivity

• Features and characteristics of OOP

• Major concepts of OOP

• OOP languages

• OOP and traditional design

• Advantages and disadvantages




&                                               %
                                        OOP-2
'                                                                      $

         What is Object-Oriented Programming


• A well-regarded and widely accepted programming technology

• Potential for much improved productivity

• Uses interacting program objects

• Objects are independent entities

• Objects respond to messages




&                                                                      %
                                                               OOP-3
'                                                             $

                Software Productivity Factors


• Modularity (separation of duties)

• Extensibility (responsive to future requirements)

• Modifiability (easy to make small changes)

• Flexibility (not cast in concrete)

• Maintainability (big savings)

• Reusability (don’t reinvent the wheel)




&                                                             %
                                                      OOP-4
'                                                              $

            Software Engineering Techniques


• Data abstraction (hidden data representation)

• Program encapsulation (operations married to data)

• Software libraries (fixed reusable)

• Reusable Objects (flexible, reusable)

• Polymorphism (type-related generic operations)

• Maintenance automation




&                                                              %
                                                       OOP-5
'                                                   $

                     OOP Central Concepts


• Data abstraction

• Encapsulation

• Classification

• Inheritance

• Polymorphism




&                                                   %
                                            OOP-6
'                                                  $

                     OOP Characteristics


• Class definitions

• Inheritance and class hierarchy

• Operator and Function overloading

• Generic classes

• Class libraries




&                                                  %
                                           OOP-7
'                                                         $

                       OOP Languages


• Simula

• Modula

• Smalltalk

• Ada

• Objective-C

• CLOS (Common Lisp Object Standard)

• Standard C++

• Java

• Scripting languages: Perl, Javascript, Python
&                                                         %
                                                  OOP-8
'                                                    $

                   Traditional vs. OOP


• Procedural Programming :


    data structures + algorithms = Program


• OOP :


          objects + messages = Program




&                                                    %
                                             OOP-9
'                                                  $

                        Class Definition


• Blueprint for building Objects

• Members: methods and fields

• private and public

• API—application programming interface

• relation with other classes




&                                                  %
                                          OOP-10
'                                $

         An Object


               Public
Method       Internal
 call         working
            interface




&                                %
                        OOP-11
'                                                   $

             Inheritance Example


     Auto                          Sedan

    Engine                    2−4 Doors
    Steering                  4 Wheels
                   Inherits
    Breaks                    Radio

    Doors                     Trunk

    Wheels
    Tires
&                                                   %
                                           OOP-12
'                                                 $

            Inheritance Example


    Sedan                 Family Sedan

2−4 Doors                 4 Doors
4 Wheels                  AC
              Inherits    Automatic
Radio
                          Big Trunk
Trunk                     Fuel Economy




&                                                 %
                                         OOP-13
'                                                 $

            Inheritance Example


    Sedan                 Sports Sedan

2−4 Doors                 2 Doors
4 Wheels                  AC
              Inherits    Manual
Radio
                          Tiny Trunk
Trunk                     Horse power
                          High Price



&                                                 %
                                         OOP-14
'                                                       $

                        Inheritance Concepts


• Deriving new classes from old ones

• Single inheritance

• Partial inheritance

• Multiple inheritance

• Inheritance chain




&                                                       %
                                               OOP-15
'                                                    $

                          Generic Classes


• Class definition for unspecified data

• Container class

• Flexible and reusable




&                                                    %
                                            OOP-16
'                                                        $

                 Reusability Considerations


• Pipes / filter (ala UNIX): slow, restrictive

• Subroutine libraries: fast, inflexible

• Object libraries: flexible, and efficient




&                                                        %
                                                OOP-17
'                                                $

                    Design Approaches


• Ways to Break The Problem Down

• Procedural decomposition

• Data decomposition

• Object-oriented decomposition




&                                                %
                                        OOP-18
'                                                           $

                 Procedural Decomposition


• Also known as functional or traditional design

• Decompose the solution into major steps

• Decompose each major step further

• Decomposition procedural-oriented




&                                                           %
                                                   OOP-19
'                                                       $

            Traditional Design Disadvantages


• Data and operations are separated

• No data abstraction or info hiding

• Not responsive to changes in problem space

• Inadequate for concurrent problems




&                                                       %
                                               OOP-20
'                                                                $

             Object-oriented Design Principle


• Identify interacting objects

• Characterize each object, establish attributes

• Identify the data and operations within each object

• Identify requests answered by each object

• Identity services required of other objects

• Establish relationships to other objects

• Group similar objects together

• Implement common super classes

• Implement different objects as classes
&                                                                %
                                                        OOP-21
'                                                $

                           Advantages


• Responsive to changes

• Encapsulation

• Simplify Testing, debugging

• Easy to understand

• Avoid reinventing the wheel

• Easier to manage, to maintain

• Off-the-shelf software




&                                                %
                                        OOP-22
'                                                     $

                   Potential Disadvantages


• Over generalization

• Artificial class relations

• Unnecessary complications




&                                                     %
                                             OOP-23

Mais conteúdo relacionado

Semelhante a Oop Overview

Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 
Perl University: Getting Started with Perl
Perl University: Getting Started with PerlPerl University: Getting Started with Perl
Perl University: Getting Started with Perlbrian d foy
 
Modern Webdevelopment With Ruby On Rails
Modern Webdevelopment With Ruby On RailsModern Webdevelopment With Ruby On Rails
Modern Webdevelopment With Ruby On RailsRobert Glaser
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Ivo Jansch
 
Scala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformScala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformTomoharu ASAMI
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented PhpA Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented PhpMichael Girouard
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 NotesRoss Lawley
 
Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)Stefan Koopmanschap
 
Jumping Into Java Then!
Jumping Into Java Then!Jumping Into Java Then!
Jumping Into Java Then!mondodello
 
The Forces Driving Java
The Forces Driving JavaThe Forces Driving Java
The Forces Driving JavaSteve Elliott
 
Practical Intro Merb
Practical Intro MerbPractical Intro Merb
Practical Intro MerbPaul Pajo
 
Practical Intro Merb
Practical Intro MerbPractical Intro Merb
Practical Intro MerbPaul Pajo
 
The 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEPThe 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEPIoannis Baltopoulos
 

Semelhante a Oop Overview (20)

Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Object
ObjectObject
Object
 
Perl University: Getting Started with Perl
Perl University: Getting Started with PerlPerl University: Getting Started with Perl
Perl University: Getting Started with Perl
 
Workin On The Rails Road
Workin On The Rails RoadWorkin On The Rails Road
Workin On The Rails Road
 
Modern Webdevelopment With Ruby On Rails
Modern Webdevelopment With Ruby On RailsModern Webdevelopment With Ruby On Rails
Modern Webdevelopment With Ruby On Rails
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)
 
Relational Cloud
Relational CloudRelational Cloud
Relational Cloud
 
Scala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud PlatformScala in Model-Driven development for Apparel Cloud Platform
Scala in Model-Driven development for Apparel Cloud Platform
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented PhpA Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented Php
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
 
Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)
 
Jumping Into Java Then!
Jumping Into Java Then!Jumping Into Java Then!
Jumping Into Java Then!
 
The Forces Driving Java
The Forces Driving JavaThe Forces Driving Java
The Forces Driving Java
 
Becoming A Php Ninja
Becoming A Php NinjaBecoming A Php Ninja
Becoming A Php Ninja
 
Practical Intro Merb
Practical Intro MerbPractical Intro Merb
Practical Intro Merb
 
Practical Intro Merb
Practical Intro MerbPractical Intro Merb
Practical Intro Merb
 
Amoocon May 2009 Germany
Amoocon May 2009   GermanyAmoocon May 2009   Germany
Amoocon May 2009 Germany
 
The 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEPThe 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEP
 

Último

Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...amitlee9823
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperityhemanthkumar470700
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLkapoorjyoti4444
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfAmzadHosen3
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Sheetaleventcompany
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...daisycvs
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1kcpayne
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 

Último (20)

Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperity
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 

Oop Overview

  • 1. ' $ Object-Oriented Programming An Overview & % OOP-1
  • 2. ' $ Contents • OOP and software productivity • Features and characteristics of OOP • Major concepts of OOP • OOP languages • OOP and traditional design • Advantages and disadvantages & % OOP-2
  • 3. ' $ What is Object-Oriented Programming • A well-regarded and widely accepted programming technology • Potential for much improved productivity • Uses interacting program objects • Objects are independent entities • Objects respond to messages & % OOP-3
  • 4. ' $ Software Productivity Factors • Modularity (separation of duties) • Extensibility (responsive to future requirements) • Modifiability (easy to make small changes) • Flexibility (not cast in concrete) • Maintainability (big savings) • Reusability (don’t reinvent the wheel) & % OOP-4
  • 5. ' $ Software Engineering Techniques • Data abstraction (hidden data representation) • Program encapsulation (operations married to data) • Software libraries (fixed reusable) • Reusable Objects (flexible, reusable) • Polymorphism (type-related generic operations) • Maintenance automation & % OOP-5
  • 6. ' $ OOP Central Concepts • Data abstraction • Encapsulation • Classification • Inheritance • Polymorphism & % OOP-6
  • 7. ' $ OOP Characteristics • Class definitions • Inheritance and class hierarchy • Operator and Function overloading • Generic classes • Class libraries & % OOP-7
  • 8. ' $ OOP Languages • Simula • Modula • Smalltalk • Ada • Objective-C • CLOS (Common Lisp Object Standard) • Standard C++ • Java • Scripting languages: Perl, Javascript, Python & % OOP-8
  • 9. ' $ Traditional vs. OOP • Procedural Programming : data structures + algorithms = Program • OOP : objects + messages = Program & % OOP-9
  • 10. ' $ Class Definition • Blueprint for building Objects • Members: methods and fields • private and public • API—application programming interface • relation with other classes & % OOP-10
  • 11. ' $ An Object Public Method Internal call working interface & % OOP-11
  • 12. ' $ Inheritance Example Auto Sedan Engine 2−4 Doors Steering 4 Wheels Inherits Breaks Radio Doors Trunk Wheels Tires & % OOP-12
  • 13. ' $ Inheritance Example Sedan Family Sedan 2−4 Doors 4 Doors 4 Wheels AC Inherits Automatic Radio Big Trunk Trunk Fuel Economy & % OOP-13
  • 14. ' $ Inheritance Example Sedan Sports Sedan 2−4 Doors 2 Doors 4 Wheels AC Inherits Manual Radio Tiny Trunk Trunk Horse power High Price & % OOP-14
  • 15. ' $ Inheritance Concepts • Deriving new classes from old ones • Single inheritance • Partial inheritance • Multiple inheritance • Inheritance chain & % OOP-15
  • 16. ' $ Generic Classes • Class definition for unspecified data • Container class • Flexible and reusable & % OOP-16
  • 17. ' $ Reusability Considerations • Pipes / filter (ala UNIX): slow, restrictive • Subroutine libraries: fast, inflexible • Object libraries: flexible, and efficient & % OOP-17
  • 18. ' $ Design Approaches • Ways to Break The Problem Down • Procedural decomposition • Data decomposition • Object-oriented decomposition & % OOP-18
  • 19. ' $ Procedural Decomposition • Also known as functional or traditional design • Decompose the solution into major steps • Decompose each major step further • Decomposition procedural-oriented & % OOP-19
  • 20. ' $ Traditional Design Disadvantages • Data and operations are separated • No data abstraction or info hiding • Not responsive to changes in problem space • Inadequate for concurrent problems & % OOP-20
  • 21. ' $ Object-oriented Design Principle • Identify interacting objects • Characterize each object, establish attributes • Identify the data and operations within each object • Identify requests answered by each object • Identity services required of other objects • Establish relationships to other objects • Group similar objects together • Implement common super classes • Implement different objects as classes & % OOP-21
  • 22. ' $ Advantages • Responsive to changes • Encapsulation • Simplify Testing, debugging • Easy to understand • Avoid reinventing the wheel • Easier to manage, to maintain • Off-the-shelf software & % OOP-22
  • 23. ' $ Potential Disadvantages • Over generalization • Artificial class relations • Unnecessary complications & % OOP-23