Question: Q5c. Override the instance method check_in for the AclassWard class as follows. Method name check_in Parameter(sy 1. patient_name: str argument(s) 2. needs_sleep_unit: bool The second

Q5c. Override the instance method check_in for the AclassWard class as follows. Method name check_in Parameter(sy 1. patient_name: str argument(s) 2. needs_sleep_unit: bool The second parameter, needs_sleep_unit, is an optional parameter and its default value is False. Return value This method does not have a return value Detailed Call the method of same name in the parent's class with patient_name description as the parameter. Use the parameter needs_sleep_unit to set the value of the instance attribute has sleeper_unit. Example usage ward2012 = Aclassward() ward2e1a.check_in("Tom Harris", False) ward201b = Aclassward() ward2016.check_in("Cassandra Green", True) print(ward201a.patients[0].name) print(ward2e1a.has_sleeper_unit) print(ward2016.patients[0].name) print (ward201b.has_sleeper_unit) Example usage output Tom Harris False Cassandra Green True Q5c. Override the instance method check_in for the AclassWard class as follows. Method name check_in Parameter(sy 1. patient_name: str argument(s) 2. needs_sleep_unit: bool The second parameter, needs_sleep_unit, is an optional parameter and its default value is False. Return value This method does not have a return value Detailed Call the method of same name in the parent's class with patient_name description as the parameter. Use the parameter needs_sleep_unit to set the value of the instance attribute has sleeper_unit. Example usage ward2012 = Aclassward() ward2e1a.check_in("Tom Harris", False) ward201b = Aclassward() ward2016.check_in("Cassandra Green", True) print(ward201a.patients[0].name) print(ward2e1a.has_sleeper_unit) print(ward2016.patients[0].name) print (ward201b.has_sleeper_unit) Example usage output Tom Harris False Cassandra Green True
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
