This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2023_Stanislav_Mykhailenko/Lesson_4/Task_2/MagicClass.cs
2023-04-03 17:11:06 +03:00

32 lines
692 B
C#

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!");
}
}
public class WaterMagic : Magic
{
public override void CountYourMagic()
{
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...");
}
}
}