SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
'                                     $




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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
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
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...Suhani Kapoor
 
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
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdftbatkhuu1
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...lizamodels9
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876dlhescort
 

Dernier (20)

Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
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...
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
 
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
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdf
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 

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