-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
40 lines (39 loc) · 1.3 KB
/
Program.cs
File metadata and controls
40 lines (39 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
namespace DesignPrinciple
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Select a design principle to run:");
Console.WriteLine("1. Single Responsibility Principle (SRP)");
Console.WriteLine("2. Open/Closed Principle (OCP)");
Console.WriteLine("3. Liskov Substitution Principle (LSP)");
Console.WriteLine("4. Interface Segregation Principle (ISP)");
Console.WriteLine("5. Dependency Inversion Principle (DIP)");
// Add more opt
var choice = Console.ReadLine();
switch (choice)
{
case "1":
SingleResponsibilityPrinciple.Run();
break;
case "2":
OpenClosedPrinciple.Run();
break;
case "3":
LiskovSubstitutionPrinciple.Run();
break;
case "4":
InterfaceSegregationPrinciple.Run();
break;
case "5":
DependencyInversionPrinciple.Run();
break;
default:
Console.WriteLine("Invalid choice.");
break;
}
}
}
}