From 93735d88788bbdeafec4fc13e55b78dc9a58c6d9 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Mon, 22 Feb 2021 23:26:20 +1100 Subject: [PATCH] Finished Defining an Abstract Class, repo at 1b38d89 --- csharp_fundamentals/8_oop.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/csharp_fundamentals/8_oop.md b/csharp_fundamentals/8_oop.md index acb1d84..3e0a2bc 100644 --- a/csharp_fundamentals/8_oop.md +++ b/csharp_fundamentals/8_oop.md @@ -65,4 +65,18 @@ This class has methods: * `GetHashCode()` * ... -All these methods will be inherited in its derived class (i.e. all classes) \ No newline at end of file +All these methods will be inherited in its derived class (i.e. all classes) + +## Setting up a Scenario & Defining and Abstract Class + +Reference: +* [Abstract and Sealed Classes and Class Members (C# Programming Guide)](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/abstract-and-sealed-classes-and-class-members#abstract-classes-and-class-members) +* [Abstract Class and Abstract Methods in C# (dotnettutorials.net)](https://dotnettutorials.net/lesson/abstract-class-abstract-methods-csharp/) +* [Polymorphism in C# (dotnettutorials.net)](https://dotnettutorials.net/lesson/polymorphism-csharp/) + +> vehicle is something that has various forms; two-wheeler, three-wheeler and four-wheeler and so on. So this is one example of polymorphism. +> Technically we can say that when a function shows different behaviors when we passed different types and number values, then it is called polymorphism. So behaving in different ways depending on the input received is known as polymorphism i.e. whenever the input changes, automatically the output or the behavior also changes. + +Abstract class is prerequist of polymorphism + +TODO: Understand polymorphism more deeply. \ No newline at end of file