diff --git a/src/main/resources/templates/go/readme b/src/main/resources/templates/go/readme index c7fe27a3449b..cc50dd5e3984 100755 --- a/src/main/resources/templates/go/readme +++ b/src/main/resources/templates/go/readme @@ -8,10 +8,10 @@ First, we need to implement two sorting algorithms, in this case `MergeSort` and **You have the following tasks:** -1. [task][Implement Bubble Sort](artemis/testing/test/structural.TestBubbleSort,artemis/testing/test/behavior.TestBubbleSortSortsCorrectly) +1. [task][Implement Bubble Sort](TestBubbleSort,TestBubbleSortSortsCorrectly) Implement the method `PerformSort([]time.Time)` in the class `BubbleSort`. Make sure to follow the Bubble Sort algorithm exactly. -2. [task][Implement Merge Sort](artemis/testing/test/structural.TestMergeSort,artemis/testing/test/behavior.TestMergeSortSortsCorrectly) +2. [task][Implement Merge Sort](TestMergeSort,TestMergeSortSortsCorrectly) Implement the method `PerformSort([]time.Time)` in the class `MergeSort`. Make sure to follow the Merge Sort algorithm exactly. ### Part 2: Strategy Pattern @@ -25,16 +25,16 @@ Implement exported getters and setters for the UML attributes and associations. 1. SortStrategy Interface Create a `SortStrategy` interface and adjust the sorting algorithms so that they implement this interface. -2. [task][Context Class](artemis/testing/test/structural.TestContext) +2. [task][Context Class](TestContext) Create and implement a `Context` class following the below class diagram -3. [task][Context Policy](artemis/testing/test/structural.TestPolicy) +3. [task][Context Policy](TestPolicy) Create and implement a `Policy` class following the below class diagram with a simple configuration mechanism: - 1. [task][Select MergeSort](artemis/testing/test/behavior.TestUseMergeSortForBigList) + 1. [task][Select MergeSort](TestUseMergeSortForBigList) Select `MergeSort` when the slice has more than 10 dates. - 2. [task][Select BubbleSort](artemis/testing/test/behavior.TestUseBubbleSortForSmallList) + 2. [task][Select BubbleSort](TestUseBubbleSortForSmallList) Select `BubbleSort` when the slice has less or equal 10 dates. 4. Complete the `Client` class which demonstrates switching between two strategies at runtime. @@ -44,12 +44,12 @@ Create and implement a `Policy` class following the below class diagram with a s class Client { } -class Policy ##testsColor(artemis/testing/test/structural.TestPolicy) { +class Policy ##testsColor(TestPolicy) { +NewPolicy() <> - +Configure() + +Configure() } -class Context ##testsColor(artemis/testing/test/structural.TestContext) { +class Context ##testsColor(TestContext) { -dates: []time.Time +NewContext() <> +Sort() @@ -59,20 +59,20 @@ interface SortStrategy { +PerformSort([]time.Time) } -class BubbleSort ##testsColor(artemis/testing/test/structural.TestBubbleSort) { +class BubbleSort ##testsColor(TestBubbleSort) { +NewBubbleSort() <> - +PerformSort([]time.Time) + +PerformSort([]time.Time) } -class MergeSort ##testsColor(artemis/testing/test/structural.TestMergeSort) { +class MergeSort ##testsColor(TestMergeSort) { +NewMergeSort() <> - +PerformSort([]time.Time) + +PerformSort([]time.Time) } MergeSort -up-|> SortStrategy BubbleSort -up-|> SortStrategy -Policy -right-> Context #testsColor(artemis/testing/test/structural.TestPolicy): context -Context -right-> SortStrategy #testsColor(artemis/testing/test/structural.TestContext): sortAlgorithm +Policy -right-> Context #testsColor(TestPolicy): context +Context -right-> SortStrategy #testsColor(TestContext): sortAlgorithm Client .down.> Policy Client .down.> Context