-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4.isp.py
More file actions
46 lines (32 loc) · 834 Bytes
/
4.isp.py
File metadata and controls
46 lines (32 loc) · 834 Bytes
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
"""
Interface Segregation Principle
Crie interfaces que são específicas. Clientes não devem depender de interfaces que eles não usarão
"""
from abc import ABC
class IJanela(ABC):
def maximizar(self):
raise NotImplementedError
def minimizar(self):
raise NotImplementedError
def mostrar_menu(self):
raise NotImplementedError
def fechar(self):
raise NotImplementedError
class JanelaTamanhoFixo(IJanela):
def maximizar(self):
pass
def minimizar(self):
pass
def mostrar_menu(self):
pass
def fechar(self):
pass
class JanelaSemMenu(IJanela):
def maximizar(self):
pass
def minimizar(self):
pass
def mostrar_menu(self):
pass
def fechar(self):
pass