Menu

V Wondering Set Requirements Class Name Property Returns Capitalized Name Setter Checks Na Q43779270

EMPLOYEE CLASS Employee - name: str - eid: str +<<property>> name : str +<<property>>eid : str +_init__(name : str, eid : strv

just wondering how to set up these to requirements below in theclass.

name: property returns capitalized name and setterchecks the name isalpha() and if true store the name in the objectotherwise store ‘Unknown’

eid: property returns eid zero filled up to 4 spaces andsetter will assign ‘9999’ if length is zero, otherwise store theeid.

THANKS,

EMPLOYEE CLASS Employee – name: str – eid: str +<<property>> name : str +<<property>>eid : str +_init__(name : str, eid : str) + str_0:str Purpose: Employee class abstracts the notion of an Employee. Use name mangling on variables. Properties: Implement properties as seen in the UML Class Diagram. Both properties must implement both the property and setter decorators. name: property returns capitalized name and setter checks the name isalpha() and if true store the name in the object otherwise store ‘Unknown’ eid: property returns eid zero filled up to 4 spaces and setter will assign ‘9999’ if length is zero, otherwise store the eid. Methods: str_0 formats ‘<eid>: <name>’ so all employee always print both id and name. Show transcribed image text EMPLOYEE CLASS Employee – name: str – eid: str + name : str +eid : str +_init__(name : str, eid : str) + str_0:str Purpose: Employee class abstracts the notion of an Employee. Use name mangling on variables. Properties: Implement properties as seen in the UML Class Diagram. Both properties must implement both the property and setter decorators. name: property returns capitalized name and setter checks the name isalpha() and if true store the name in the object otherwise store ‘Unknown’ eid: property returns eid zero filled up to 4 spaces and setter will assign ‘9999’ if length is zero, otherwise store the eid. Methods: str_0 formats ‘: ‘ so all employee always print both id and name.

Expert Answer


Answer to v just wondering how to set up these to requirements below in the class. name: property returns capitalized name and set…

OR