-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathproblem2.py
52 lines (35 loc) · 930 Bytes
/
problem2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class A:
def build_floor(self):
raise NotImplementedError
def build_body(self):
raise NotImplementedError
def build_ceiling(self):
raise NotImplementedError
class House(A):
def build_floor(self):
print("Build House Floor")
def build_body(self):
print("Build House Body")
def build_ceiling(self):
print("Build House Ceiling")
class Building(A):
def build_floor(self):
print("Build Building Floor")
def build_body(self):
print("Build Building Body")
def build_ceiling(self):
print("Build Building Ceiling")
def build(cls):
# TODO: fill this method
if __name__ == "__main__":
build(House)
build(Building)
"""
Expected Output
> Build House Floor
> Build House Body
> Build House Ceiling
> Build Building Floor
> Build Building Body
> Build Building Ceiling
"""