https://github.com/stefanerrorerko/netlab5
Implementation of behaviour patterns in C# (Strategy and Iterator)
https://github.com/stefanerrorerko/netlab5
csharp patterns study-project
Last synced: 5 months ago
JSON representation
Implementation of behaviour patterns in C# (Strategy and Iterator)
- Host: GitHub
- URL: https://github.com/stefanerrorerko/netlab5
- Owner: StefanErrorerko
- Created: 2022-06-26T09:16:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T13:16:55.000Z (over 1 year ago)
- Last Synced: 2025-06-06T18:07:27.184Z (about 1 year ago)
- Topics: csharp, patterns, study-project
- Language: C#
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .NET Lab4
Lab4 | Design Patterns (поведінкові) | Strategy + Iterator
Stefan Muzyka
IS-02
Variant 11
## Task:
Develop a model for selecting sorting methods and finding the maximum/minimum value in an array of numerical objects.
ОРПЗ .НЕТ ЛР №5
## Explanation of the Project Structure:
In the design of the application, I combined two design patterns – Strategy and Iterator.
- The collection of double numbers is described by the DoubleCollection class, which implements the abstract class IterableCollection.
- The iterator itself is described by the abstract class CollectionIterator, which implements the Iterator class.
- Different sorting types are described by classes such as MergeSort, InsertionSort, and BubbleSort, which, in turn, implement the ISort interface.
- AnalyseSort acts as a mediator between the user and the actual sorting process, providing additional functions for the user, such as calculating the time spent on sorting and determining the minimum and maximum elements.
## Class diagram using Strategy + Iterator patterns
