This repository has been archived on 2025-02-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-2/Diploma/strategy.plant

41 lines
802 B
Plaintext

@startuml
class Program{
+ static void Main(string[] args)
}
abstract class SortStrategy
{
+ <<abstract>> void Sort(List<string> list);
}
class QuickSort extends SortStrategy
{
+ <<override>> void Sort(List<string> list)
}
class ShellSort extends SortStrategy
{
+ <<override>> void Sort(List<string> list)
}
class MergeSort extends SortStrategy
{
+ <<override>> void Sort(List<string> list)
}
class SortedList
{
- List<string> list = new List<string>();
- SortStrategy sortstrategy;
+ void SetSortStrategy(SortStrategy sortstrategy)
+ void Add(string name)
+ void Sort()
}
Program -l-> SortedList
SortedList "1..*" o--> "1" SortStrategy
@enduml