MCPcopy Create free account
hub / github.com/RefactoringGuru/design-patterns-python / ConcreteClass1

Class ConcreteClass1

src/TemplateMethod/Conceptual/main.py:93–107  ·  view source on GitHub ↗

EN: Concrete classes have to implement all abstract operations of the base class. They can also override some operations with a default implementation. RU: Конкретные классы должны реализовать все абстрактные операции базового класса. Они также могут переопределить некоторые операц

Source from the content-addressed store, hash-verified

91
92
93class ConcreteClass1(AbstractClass):
94 """
95 EN: Concrete classes have to implement all abstract operations of the base
96 class. They can also override some operations with a default implementation.
97
98 RU: Конкретные классы должны реализовать все абстрактные операции базового
99 класса. Они также могут переопределить некоторые операции с реализацией по
100 умолчанию.
101 """
102
103 def required_operations1(self) -> None:
104 print("ConcreteClass1 says: Implemented Operation1")
105
106 def required_operations2(self) -> None:
107 print("ConcreteClass1 says: Implemented Operation2")
108
109
110class ConcreteClass2(AbstractClass):

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected