From b5db4e464067e78323e9eba76c173bb1d82eb7f8 Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Sun, 9 Apr 2023 21:00:28 +0300 Subject: [PATCH] Update Lesson 4 Task 2 --- Lesson_4/Task_2/FireMagic.cs | 16 ++++++++++++++++ Lesson_4/Task_2/Magic.cs | 16 ++++++++++++++++ Lesson_4/Task_2/{MagicClass.cs => WaterMagic.cs} | 16 ---------------- 3 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 Lesson_4/Task_2/FireMagic.cs create mode 100644 Lesson_4/Task_2/Magic.cs rename Lesson_4/Task_2/{MagicClass.cs => WaterMagic.cs} (51%) diff --git a/Lesson_4/Task_2/FireMagic.cs b/Lesson_4/Task_2/FireMagic.cs new file mode 100644 index 0000000..407f147 --- /dev/null +++ b/Lesson_4/Task_2/FireMagic.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Open_Closed +{ + public class FireMagic : Magic + { + public override void CountYourMagic() + { + Console.WriteLine("Wow, your magic is fire magic!"); + } + } +} diff --git a/Lesson_4/Task_2/Magic.cs b/Lesson_4/Task_2/Magic.cs new file mode 100644 index 0000000..5b4d30c --- /dev/null +++ b/Lesson_4/Task_2/Magic.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Open_Closed +{ + public class Magic + { + public virtual void CountYourMagic() + { + Console.WriteLine("I understand you..."); + } + } +} diff --git a/Lesson_4/Task_2/MagicClass.cs b/Lesson_4/Task_2/WaterMagic.cs similarity index 51% rename from Lesson_4/Task_2/MagicClass.cs rename to Lesson_4/Task_2/WaterMagic.cs index 84b4728..036d157 100644 --- a/Lesson_4/Task_2/MagicClass.cs +++ b/Lesson_4/Task_2/WaterMagic.cs @@ -6,14 +6,6 @@ using System.Threading.Tasks; namespace Open_Closed { - public class FireMagic : Magic - { - public override void CountYourMagic() - { - Console.WriteLine("Wow, your magic is fire magic!"); - } - } - public class WaterMagic : Magic { public override void CountYourMagic() @@ -21,12 +13,4 @@ namespace Open_Closed Console.WriteLine("Incredible! You have 50 millions of power! It's water magic!"); } } - - public class Magic - { - public virtual void CountYourMagic() - { - Console.WriteLine("I understand you..."); - } - } }