SlideShare une entreprise Scribd logo
1  sur  11
Coding Horror
The scary show for Programmers
Based on True stories from the desk of
software programmers
Inheritance
Episode #1
About the dumbledores
Syed Mansoor Ahmed
(Project Manager)
- Proud Wiproite from last
10 Yrs
- Leads AppC Automation
team
syedmansoor.ahamed@wipro.co
m
Ankit Kashyap
(Analyst Programmer)
- Proud Wiproite from last
5.9 Yrs
- Works as developer;
take care of AppC tools
ankit.kashyap@wipro.com
Why We need it?
Open Close Principle
“software entities (classes, modules, functions,
etc.) should be open for extension, but closed for
modification”
-from Wikipedia
We all know Inheritance! Yay!!
Let’s check it!!!
Time for hands-on…
Car is a
vehicle! So
sweet!!
Back to geometry classes!!
Rectangle Square
Square is a
Rectangle
Awww! Cute ducks need software…
And here darkness ends!!
*Shameless copy from some site
Under the tree! Like Budhha
• Are constructors and destructors inherited ?
• How do you prevent a class from being inherited ?
• Can you mark method as sealed ?
• what do you mean by upcasting and downcasting ?
References…
• http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29
• http://stackoverflow.com/questions/4428725/can-you-explain-liskov-
substitution-principle-with-a-good-c-sharp-example
• http://en.wikipedia.org/wiki/Liskov_substitution_principle

Contenu connexe

Similaire à C# basics training (Inheritance)

25 10-2010 presentation ois evening4
25 10-2010 presentation ois evening425 10-2010 presentation ois evening4
25 10-2010 presentation ois evening4
Neels Westhuizen
 
Micromouse
MicromouseMicromouse
Micromouse
butest
 

Similaire à C# basics training (Inheritance) (20)

C# basics training (Interfaces)
C# basics training (Interfaces)C# basics training (Interfaces)
C# basics training (Interfaces)
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
 
25 10-2010 presentation ois evening4
25 10-2010 presentation ois evening425 10-2010 presentation ois evening4
25 10-2010 presentation ois evening4
 
Reimagining User Experiences/User Interfaces
Reimagining User Experiences/User InterfacesReimagining User Experiences/User Interfaces
Reimagining User Experiences/User Interfaces
 
Using legacy code with micro frontends
Using legacy code with micro frontendsUsing legacy code with micro frontends
Using legacy code with micro frontends
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
 
Micromouse
MicromouseMicromouse
Micromouse
 
Pharo, Spec and GTK
Pharo, Spec and GTKPharo, Spec and GTK
Pharo, Spec and GTK
 
About RumiCar project
About RumiCar projectAbout RumiCar project
About RumiCar project
 
"Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina "Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina
 
Robotic hand
Robotic handRobotic hand
Robotic hand
 
Unikernels: when you should and when you shouldn't
Unikernels: when you should and when you shouldn'tUnikernels: when you should and when you shouldn't
Unikernels: when you should and when you shouldn't
 
RESUME
RESUMERESUME
RESUME
 
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
 
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
 
final project-1.pptx
final project-1.pptxfinal project-1.pptx
final project-1.pptx
 
Simulation in Robotics
Simulation in RoboticsSimulation in Robotics
Simulation in Robotics
 
Kamaelia Europython Tutorial
Kamaelia Europython TutorialKamaelia Europython Tutorial
Kamaelia Europython Tutorial
 
Hexagonal Architecture.pdf
Hexagonal Architecture.pdfHexagonal Architecture.pdf
Hexagonal Architecture.pdf
 

Plus de Ankit Kashyap (7)

Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVC
 
Azure SQL, Blobs and ATS
Azure SQL, Blobs and ATSAzure SQL, Blobs and ATS
Azure SQL, Blobs and ATS
 
Azure fundamentals Part 1
Azure fundamentals Part 1 Azure fundamentals Part 1
Azure fundamentals Part 1
 
Wipro hackathon tekpill
Wipro hackathon tekpillWipro hackathon tekpill
Wipro hackathon tekpill
 
Code workshop
Code workshopCode workshop
Code workshop
 
C# basics training (tips and tricks)
C# basics training (tips and tricks)C# basics training (tips and tricks)
C# basics training (tips and tricks)
 
Fast Track - Windows 8 Apps
Fast Track - Windows 8 AppsFast Track - Windows 8 Apps
Fast Track - Windows 8 Apps
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

C# basics training (Inheritance)