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..."); - } - } }