Question: Continue working on your Lab 7 , in this lab, we need to modify some methods - Instead of having them return True / False
Continue working on your Lab in this lab, we need to modify some methods Instead of having them return TrueFalse modify each one to throw an exception if invalid data is passed. In other words, you just need to modify predefined methods to throw an exception when "False". Here are some sample code:
def setofficenumberself x:
if x or x :
raise ValueError
else:
self.officenumber x
In terms of setname, replace can be used to remove specific characters
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
