This document is a summary of the first episode of the fictional coding horror TV show "Coding Horror". It introduces the project manager Syed Mansoor Ahmed and analyst programmer Ankit Kashyap. It then discusses the open-closed principle and provides examples of inheritance using cars/vehicles and rectangles/squares. It poses questions about constructors, destructors, preventing inheritance, and upcasting/downcasting and references additional resources on the topics.
1 of 11
More Related Content
C# basics training (Inheritance)
1. Coding Horror
The scary show for Programmers
Based on True stories from the desk of
software programmers
3. 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
5. Open Close Principle
¡°software entities (classes, modules, functions,
etc.) should be open for extension, but closed for
modification¡±
-from Wikipedia
6. We all know Inheritance! Yay!!
Let¡¯s check it!!!
Time for hands-on¡
Car is a
vehicle! So
sweet!!
7. Back to geometry classes!!
Rectangle Square
Square is a
Rectangle
10. 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 ?