Skip to content

Commit 20501f2

Browse files
David Orriss Jrochococo
David Orriss Jr
authored andcommitted
fix implementation of template pattern
1 parent fc21337 commit 20501f2

File tree

1 file changed

+6
-6
lines changed
  • Design-Patterns.playground/Pages/Behavioral.xcplaygroundpage

1 file changed

+6
-6
lines changed

‎Design-Patterns.playground/Pages/Behavioral.xcplaygroundpage/Contents.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,9 @@ protocol Garden {
636636
extension Garden {
637637

638638
func prepareGarden() {
639-
func prepareSoil() {}
640-
func plantSeeds() {}
641-
func waterPlants() {}
639+
prepareSoil()
640+
plantSeeds()
641+
waterPlants()
642642
}
643643
}
644644

@@ -649,15 +649,15 @@ final class RoseGarden: Garden {
649649
}
650650

651651
func prepareSoil() {
652-
// Implementation
652+
print("prepareSoil for Rose Garden")
653653
}
654654

655655
func plantSeeds() {
656-
// Implementation
656+
print("Plant Seeds for Rose Garden")
657657
}
658658

659659
func waterPlants() {
660-
// Implementation
660+
print("Water the Rose Garden")
661661
}
662662
}
663663

0 commit comments

Comments
 (0)