diff --git a/DesignPattern/DesignPattern.sln b/DesignPattern/DesignPattern.sln
index f4a9e0e..003116b 100644
--- a/DesignPattern/DesignPattern.sln
+++ b/DesignPattern/DesignPattern.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.32630.194
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32811.315
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Singleton", "Singleton\Singleton.csproj", "{37FE4D0C-A213-4EA5-B3EF-DB2DB3971ACE}"
EndProject
@@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Visitor", "Visitor\Visitor.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Observer", "Observer\Observer.csproj", "{22E70ACA-E876-48E9-AB00-94FD359D0D82}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Strategy", "Strategy\Strategy.csproj", "{D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -93,6 +95,10 @@ Global
{22E70ACA-E876-48E9-AB00-94FD359D0D82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22E70ACA-E876-48E9-AB00-94FD359D0D82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22E70ACA-E876-48E9-AB00-94FD359D0D82}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/DesignPattern/Strategy/App.config b/DesignPattern/Strategy/App.config
new file mode 100644
index 0000000..aee9adf
--- /dev/null
+++ b/DesignPattern/Strategy/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DesignPattern/Strategy/BitcoinPayment.cs b/DesignPattern/Strategy/BitcoinPayment.cs
new file mode 100644
index 0000000..b1c2c42
--- /dev/null
+++ b/DesignPattern/Strategy/BitcoinPayment.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Strategy
+{
+ internal class BitcoinPayment : IPayment
+ {
+ private string address;
+
+ public BitcoinPayment(string address)
+ {
+ this.address = address;
+ }
+
+ public void Pay(int amount)
+ {
+ decimal btc = (decimal)(amount / 10000000.0);
+ Console.WriteLine($"Charged {btc} to BTC: {address}");
+ }
+ }
+}
diff --git a/DesignPattern/Strategy/CardPayment.cs b/DesignPattern/Strategy/CardPayment.cs
new file mode 100644
index 0000000..da083f2
--- /dev/null
+++ b/DesignPattern/Strategy/CardPayment.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Strategy
+{
+ internal class CardPayment : IPayment
+ {
+ private string cardNo, mmyy;
+
+ public CardPayment(string cardNo, string mmyy)
+ {
+ this.cardNo = cardNo;
+ this.mmyy = mmyy;
+ }
+
+ public void Pay(int amount)
+ {
+ Console.WriteLine($"Charged {amount} to CARD: {cardNo}");
+ }
+ }
+}
diff --git a/DesignPattern/Strategy/Checkout.cs b/DesignPattern/Strategy/Checkout.cs
new file mode 100644
index 0000000..0b91877
--- /dev/null
+++ b/DesignPattern/Strategy/Checkout.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Strategy
+{
+ internal class Checkout
+ {
+ public IPayment Payment { get; set; }
+
+ public Checkout(IPayment payment)
+ {
+ Payment = payment;
+ }
+
+ public void Charge(int total)
+ {
+ Console.WriteLine($"Charging {total}");
+ this.Payment.Pay(total);
+ }
+ }
+}
diff --git a/DesignPattern/Strategy/Client.cs b/DesignPattern/Strategy/Client.cs
new file mode 100644
index 0000000..a2e4feb
--- /dev/null
+++ b/DesignPattern/Strategy/Client.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Strategy
+{
+ internal class Client
+ {
+ public static void HowToTest()
+ {
+ CardPayment card = new CardPayment("1234-5678-9101-1121", "12/25");
+ Checkout checkout = new Checkout(card);
+ checkout.Charge(20000);
+
+ BitcoinPayment btc = new BitcoinPayment("1Bd3Fd2Tddf334FFcdffs3434FF");
+ checkout.Payment = btc;
+ checkout.Charge(30000);
+ }
+ }
+}
diff --git a/DesignPattern/Strategy/IPayment.cs b/DesignPattern/Strategy/IPayment.cs
new file mode 100644
index 0000000..323635b
--- /dev/null
+++ b/DesignPattern/Strategy/IPayment.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Strategy
+{
+ internal interface IPayment
+ {
+ void Pay(int amount);
+ }
+}
diff --git a/DesignPattern/Strategy/Program.cs b/DesignPattern/Strategy/Program.cs
new file mode 100644
index 0000000..73efe0e
--- /dev/null
+++ b/DesignPattern/Strategy/Program.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Strategy
+{
+ /*
+ * 카테고리: 행위 패턴
+ * 개요: 하나의 문제 해결을 위한 다양한 알고리즘이 존재할 때,
+ * 하나의 공통 인터페이스를 통해 클라이언트가 자신에게 알맞은 알고리즘을 사용하게 함
+ */
+ internal class Program
+ {
+ static void Main(string[] args)
+ {
+ Client.HowToTest();
+
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/DesignPattern/Strategy/Properties/AssemblyInfo.cs b/DesignPattern/Strategy/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..46ccfe4
--- /dev/null
+++ b/DesignPattern/Strategy/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
+// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
+// 이러한 특성 값을 변경하세요.
+[assembly: AssemblyTitle("Strategy")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Strategy")]
+[assembly: AssemblyCopyright("Copyright © 2022")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
+// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
+// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
+[assembly: ComVisible(false)]
+
+// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
+[assembly: Guid("d6b55743-f509-4b6c-820a-db8bc5fa0ce5")]
+
+// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
+//
+// 주 버전
+// 부 버전
+// 빌드 번호
+// 수정 버전
+//
+// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
+// 기본값으로 할 수 있습니다.
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/DesignPattern/Strategy/Strategy.csproj b/DesignPattern/Strategy/Strategy.csproj
new file mode 100644
index 0000000..cfb8696
--- /dev/null
+++ b/DesignPattern/Strategy/Strategy.csproj
@@ -0,0 +1,58 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {D6B55743-F509-4B6C-820A-DB8BC5FA0CE5}
+ Exe
+ Strategy
+ Strategy
+ v4.8.1
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file