Update Lesson 4 Task 2
This commit is contained in:
parent
49f7d01245
commit
b5db4e4640
3 changed files with 32 additions and 16 deletions
16
Lesson_4/Task_2/FireMagic.cs
Normal file
16
Lesson_4/Task_2/FireMagic.cs
Normal file
|
@ -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!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
16
Lesson_4/Task_2/Magic.cs
Normal file
16
Lesson_4/Task_2/Magic.cs
Normal file
|
@ -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...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,14 +6,6 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Open_Closed
|
namespace Open_Closed
|
||||||
{
|
{
|
||||||
public class FireMagic : Magic
|
|
||||||
{
|
|
||||||
public override void CountYourMagic()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Wow, your magic is fire magic!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WaterMagic : Magic
|
public class WaterMagic : Magic
|
||||||
{
|
{
|
||||||
public override void CountYourMagic()
|
public override void CountYourMagic()
|
||||||
|
@ -21,12 +13,4 @@ namespace Open_Closed
|
||||||
Console.WriteLine("Incredible! You have 50 millions of power! It's water magic!");
|
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...");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Reference in a new issue