SlideShare a Scribd company logo
1 of 7
How OOP works in C++
Inheritance
•   What it is and why it is needed
•   Protected members
•   Order of calling constructors/destructors
•   Types of inheritance
    – public
    – protected
    – private
• Methods overload
Virtual methods
• Pointers to base class can point to derived
  object
• Why it is needed. Method overriding
• Calling basic class methods
• Do not call virtual methods in
  constructor/destructor
• Virtual destructors
Pure virtual methods
• Pure virtual methods
• Do NOT call virtual methods in
  constructor/destructor
• Do not call methods which call virtual
  methods in constructor/destructor
Interfaces
• What is called interface
• Why it is needed
C++11 keywords
• override
• final
Forward declaration
• What is it
• Why we need it

More Related Content

Similar to cpp-2013 #6 OOP Part 2

Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing SoftwareSteven Smith
 
Advanced php code igniter framework
Advanced php code igniter frameworkAdvanced php code igniter framework
Advanced php code igniter frameworkFahim Faysal Kabir
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Denim Group
 
Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#Wekoslav Stefanovski
 
Selenium web driver_2.0_presentation
Selenium web driver_2.0_presentationSelenium web driver_2.0_presentation
Selenium web driver_2.0_presentationsayhi2sudarshan
 
Mock-interview-ppt (A)- Copy.pptx
Mock-interview-ppt (A)- Copy.pptxMock-interview-ppt (A)- Copy.pptx
Mock-interview-ppt (A)- Copy.pptxLaxmiKabadi
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesSteven Smith
 
From code to pattern, part one
From code to pattern, part oneFrom code to pattern, part one
From code to pattern, part oneBingfeng Zhao
 
Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術karupanerura
 
Leandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & RightLeandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & RightNeotys_Partner
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Steven Smith
 
The Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoftThe Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoftRomSoft SRL
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NETDror Helper
 
CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287Ahmad Gohar
 
Advanced debugging
Advanced debuggingAdvanced debugging
Advanced debuggingAli Akhtar
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMIContinuent
 
ASP.NET Web API O to 100
ASP.NET Web API O to 100ASP.NET Web API O to 100
ASP.NET Web API O to 100Himanshu Desai
 

Similar to cpp-2013 #6 OOP Part 2 (20)

Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing Software
 
Advanced php code igniter framework
Advanced php code igniter frameworkAdvanced php code igniter framework
Advanced php code igniter framework
 
Zend Di in ZF 2.0
Zend Di in ZF 2.0Zend Di in ZF 2.0
Zend Di in ZF 2.0
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
 
Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#
 
Selenium web driver_2.0_presentation
Selenium web driver_2.0_presentationSelenium web driver_2.0_presentation
Selenium web driver_2.0_presentation
 
Mock-interview-ppt (A)- Copy.pptx
Mock-interview-ppt (A)- Copy.pptxMock-interview-ppt (A)- Copy.pptx
Mock-interview-ppt (A)- Copy.pptx
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
 
From code to pattern, part one
From code to pattern, part oneFrom code to pattern, part one
From code to pattern, part one
 
Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術
 
Leandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & RightLeandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & Right
 
Clean Code
Clean CodeClean Code
Clean Code
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
 
The Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoftThe Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoft
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NET
 
CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287CDI Best Practices with Real-Life Examples - TUT3287
CDI Best Practices with Real-Life Examples - TUT3287
 
Advanced debugging
Advanced debuggingAdvanced debugging
Advanced debugging
 
Training Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMITraining Slides: 254 - Using the Tungsten Replicator AMI
Training Slides: 254 - Using the Tungsten Replicator AMI
 
ASP.NET Web API O to 100
ASP.NET Web API O to 100ASP.NET Web API O to 100
ASP.NET Web API O to 100
 
06.1 .Net memory management
06.1 .Net memory management06.1 .Net memory management
06.1 .Net memory management
 

More from Amazon Web Services

More from Amazon Web Services (17)

cpp-2013 #20 Best practices
cpp-2013 #20 Best practicescpp-2013 #20 Best practices
cpp-2013 #20 Best practices
 
cpp-2013 #19 Concurrency
cpp-2013 #19 Concurrencycpp-2013 #19 Concurrency
cpp-2013 #19 Concurrency
 
cpp-2013 #18 Qt Part 2
cpp-2013 #18 Qt Part 2cpp-2013 #18 Qt Part 2
cpp-2013 #18 Qt Part 2
 
cpp-2013 #17 Libraries
cpp-2013 #17 Librariescpp-2013 #17 Libraries
cpp-2013 #17 Libraries
 
cpp-2013 #16 Automated testing
cpp-2013 #16 Automated testingcpp-2013 #16 Automated testing
cpp-2013 #16 Automated testing
 
cpp-2013 #15 Databases
cpp-2013 #15 Databasescpp-2013 #15 Databases
cpp-2013 #15 Databases
 
cpp-2013 #13 C++11
cpp-2013 #13 C++11cpp-2013 #13 C++11
cpp-2013 #13 C++11
 
cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2
 
cpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptionscpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptions
 
cpp-2013 #9 STL Algorithms Part 1
cpp-2013 #9 STL Algorithms Part 1cpp-2013 #9 STL Algorithms Part 1
cpp-2013 #9 STL Algorithms Part 1
 
cpp-2013 #8 STL Containers Part 2
cpp-2013 #8 STL Containers Part 2cpp-2013 #8 STL Containers Part 2
cpp-2013 #8 STL Containers Part 2
 
cpp-2013 #7 Templates and STL Containers
cpp-2013 #7 Templates and STL Containerscpp-2013 #7 Templates and STL Containers
cpp-2013 #7 Templates and STL Containers
 
cpp-2013 #5 File and network input/output
cpp-2013 #5 File and network input/outputcpp-2013 #5 File and network input/output
cpp-2013 #5 File and network input/output
 
cpp-2013 #4 Memory management
cpp-2013 #4 Memory managementcpp-2013 #4 Memory management
cpp-2013 #4 Memory management
 
cpp-2013 #3 OOP Basics
cpp-2013 #3 OOP Basicscpp-2013 #3 OOP Basics
cpp-2013 #3 OOP Basics
 
cpp-2013 #2 Organizing your code
cpp-2013 #2 Organizing your codecpp-2013 #2 Organizing your code
cpp-2013 #2 Organizing your code
 
cpp-2013 #1 C++ basics
cpp-2013 #1 C++ basicscpp-2013 #1 C++ basics
cpp-2013 #1 C++ basics
 

cpp-2013 #6 OOP Part 2