-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathmain.py
72 lines (49 loc) · 1.68 KB
/
main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
class Hotelier:
def __init__(self):
print('Arranging the Hotel for Marriage? --')
def __is_available(self):
print('Is the Hotel free for the event on given day?')
return True
def book_hotel(self):
if self.__is_available():
print('Registered the Booking\n')
class Florist:
def __init__(self):
print('Flowers decoration for the event? --')
def set_flower_requirements(self):
print('Carnations, Roses and Lilies would be used for decorations\n')
class Caterer:
def __init__(self):
print('Food Arrangements for the event? --')
def set_cuisine(self):
print('Chinese & Continental Cuisine to be served\n')
class Musician:
def __init__(self):
print('Musical arrangements for the marriage? --')
def set_music_type(self):
print('Jazz and Classical will be played\n')
class EventManager:
def __init__(self):
print('Event Manager:: Let me talk to the folks\n')
@staticmethod
def arrange():
hotelier = Hotelier()
hotelier.book_hotel()
florist = Florist()
florist.set_flower_requirements()
caterer = Caterer()
caterer.set_cuisine()
musician = Musician()
musician.set_music_type()
class Client:
def __init__(self):
print('Client:: Whoa! Marriage Arrangements???!!!')
def ask_event_manager(self):
print("Client:: Let's contact the event manager\n")
em = EventManager()
em.arrange()
def __del__(self):
print('Client:: Thanks to Event Manager, all preparations done!')
if __name__ == '__main__':
client = Client()
client.ask_event_manager()