From 601b31b3ddc2daef9cedbe1cde45c1040bc80786 Mon Sep 17 00:00:00 2001 From: Abdelrahman Naser Date: Mon, 12 Jul 2021 07:11:42 +0200 Subject: [PATCH 1/4] Update call_center.py Fixing typo: call.level >> call.rank --- solutions/object_oriented_design/call_center/call_center.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/object_oriented_design/call_center/call_center.py b/solutions/object_oriented_design/call_center/call_center.py index 1d5e7bc6..fab8922d 100644 --- a/solutions/object_oriented_design/call_center/call_center.py +++ b/solutions/object_oriented_design/call_center/call_center.py @@ -46,7 +46,7 @@ class Operator(Employee): super(Operator, self).__init__(employee_id, name, Rank.OPERATOR) def escalate_call(self): - self.call.level = Rank.SUPERVISOR + self.call.rank = Rank.SUPERVISOR self._escalate_call() @@ -56,7 +56,7 @@ class Supervisor(Employee): super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR) def escalate_call(self): - self.call.level = Rank.DIRECTOR + self.call.rank = Rank.DIRECTOR self._escalate_call() From 50a04c0a14bb0cf1f7bb7d66c04278dc99e43b5a Mon Sep 17 00:00:00 2001 From: Abdelrahman Naser Date: Mon, 12 Jul 2021 07:15:54 +0200 Subject: [PATCH 2/4] Update call_center.ipynb Fix typo: replace call.level with call.rank --- .../object_oriented_design/call_center/call_center.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/object_oriented_design/call_center/call_center.ipynb b/solutions/object_oriented_design/call_center/call_center.ipynb index c540c6a6..33272905 100644 --- a/solutions/object_oriented_design/call_center/call_center.ipynb +++ b/solutions/object_oriented_design/call_center/call_center.ipynb @@ -110,7 +110,7 @@ " super(Operator, self).__init__(employee_id, name, Rank.OPERATOR)\n", "\n", " def escalate_call(self):\n", - " self.call.level = Rank.SUPERVISOR\n", + " self.call.rank = Rank.SUPERVISOR\n", " self._escalate_call()\n", "\n", "\n", @@ -120,7 +120,7 @@ " super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR)\n", "\n", " def escalate_call(self):\n", - " self.call.level = Rank.DIRECTOR\n", + " self.call.rank = Rank.DIRECTOR\n", " self._escalate_call()\n", "\n", "\n", From cd116cc4ecc74745e6d5c6f40e73a1e82906a1a4 Mon Sep 17 00:00:00 2001 From: Abdelrahman Naser Date: Mon, 12 Jul 2021 07:27:35 +0200 Subject: [PATCH 3/4] Update call_center.py Add missing argument to constructors --- .../call_center/call_center.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/solutions/object_oriented_design/call_center/call_center.py b/solutions/object_oriented_design/call_center/call_center.py index fab8922d..54d42298 100644 --- a/solutions/object_oriented_design/call_center/call_center.py +++ b/solutions/object_oriented_design/call_center/call_center.py @@ -42,8 +42,8 @@ class Employee(metaclass=ABCMeta): class Operator(Employee): - def __init__(self, employee_id, name): - super(Operator, self).__init__(employee_id, name, Rank.OPERATOR) + def __init__(self, employee_id, name, call_center): + super(Operator, self).__init__(employee_id, name, Rank.OPERATOR, call_center) def escalate_call(self): self.call.rank = Rank.SUPERVISOR @@ -52,8 +52,8 @@ class Operator(Employee): class Supervisor(Employee): - def __init__(self, employee_id, name): - super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR) + def __init__(self, employee_id, name, call_center): + super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR, call_center) def escalate_call(self): self.call.rank = Rank.DIRECTOR @@ -62,8 +62,8 @@ class Supervisor(Employee): class Director(Employee): - def __init__(self, employee_id, name): - super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR) + def __init__(self, employee_id, name, call_center): + super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR, call_center) def escalate_call(self): raise NotImplementedError('Directors must be able to handle any call') From f0a6b08800971adecc1ccd87dbe4268bc31b0452 Mon Sep 17 00:00:00 2001 From: Abdelrahman Naser Date: Mon, 12 Jul 2021 07:28:37 +0200 Subject: [PATCH 4/4] Update call_center.ipynb Add missing argument in constructors --- .../call_center/call_center.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/solutions/object_oriented_design/call_center/call_center.ipynb b/solutions/object_oriented_design/call_center/call_center.ipynb index 33272905..8978e19c 100644 --- a/solutions/object_oriented_design/call_center/call_center.ipynb +++ b/solutions/object_oriented_design/call_center/call_center.ipynb @@ -106,8 +106,8 @@ "\n", "class Operator(Employee):\n", "\n", - " def __init__(self, employee_id, name):\n", - " super(Operator, self).__init__(employee_id, name, Rank.OPERATOR)\n", + " def __init__(self, employee_id, name, call_center):\n", + " super(Operator, self).__init__(employee_id, name, Rank.OPERATOR, call_center)\n", "\n", " def escalate_call(self):\n", " self.call.rank = Rank.SUPERVISOR\n", @@ -116,8 +116,8 @@ "\n", "class Supervisor(Employee):\n", "\n", - " def __init__(self, employee_id, name):\n", - " super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR)\n", + " def __init__(self, employee_id, name, call_center):\n", + " super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR, call_center)\n", "\n", " def escalate_call(self):\n", " self.call.rank = Rank.DIRECTOR\n", @@ -126,8 +126,8 @@ "\n", "class Director(Employee):\n", "\n", - " def __init__(self, employee_id, name):\n", - " super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR)\n", + " def __init__(self, employee_id, name, call_center):\n", + " super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR, call_center)\n", "\n", " def escalate_call(self):\n", " raise NotImplemented('Directors must be able to handle any call')\n",