import abc
from abc import ABCMeta
class Person(object, metaclass=ABCMeta):
def __init__(self, first, last, age):
self.firstname = first
self.lastname = last
self.age = age
@abc.abstractmethod
def change_info(self):
pass
class Employee(Person):
def __init__(self, first, last, age, staffnum):
super(Employee, self).__init__(first, last, age)
self.staffnumber = staffnum
def change_info(self, firstname, lastname, age, staffnum):
self.firstname = firstname
self.lastname = lastname
self.age = age
self.staffnum = staffnum
y = Employee("Homer", "Simpson", 28, "1007")
y.change_info("Harry", "Potter", 20, "322")
print(y.firstname)
aW1wb3J0IGFiYwpmcm9tIGFiYyBpbXBvcnQgQUJDTWV0YQoKCmNsYXNzIFBlcnNvbihvYmplY3QsIG1ldGFjbGFzcz1BQkNNZXRhKToKICAgIGRlZiBfX2luaXRfXyhzZWxmLCBmaXJzdCwgbGFzdCwgYWdlKToKICAgICAgICBzZWxmLmZpcnN0bmFtZSA9IGZpcnN0CiAgICAgICAgc2VsZi5sYXN0bmFtZSA9IGxhc3QKICAgICAgICBzZWxmLmFnZSA9IGFnZQoKICAgIEBhYmMuYWJzdHJhY3RtZXRob2QKICAgIGRlZiBjaGFuZ2VfaW5mbyhzZWxmKToKICAgICAgICBwYXNzCgoKY2xhc3MgRW1wbG95ZWUoUGVyc29uKToKICAgIGRlZiBfX2luaXRfXyhzZWxmLCBmaXJzdCwgbGFzdCwgYWdlLCBzdGFmZm51bSk6CiAgICAgICAgc3VwZXIoRW1wbG95ZWUsIHNlbGYpLl9faW5pdF9fKGZpcnN0LCBsYXN0LCBhZ2UpCiAgICAgICAgc2VsZi5zdGFmZm51bWJlciA9IHN0YWZmbnVtCgogICAgZGVmIGNoYW5nZV9pbmZvKHNlbGYsIGZpcnN0bmFtZSwgbGFzdG5hbWUsIGFnZSwgc3RhZmZudW0pOgogICAgICAgIHNlbGYuZmlyc3RuYW1lID0gZmlyc3RuYW1lCiAgICAgICAgc2VsZi5sYXN0bmFtZSA9IGxhc3RuYW1lCiAgICAgICAgc2VsZi5hZ2UgPSBhZ2UKICAgICAgICBzZWxmLnN0YWZmbnVtID0gc3RhZmZudW0KCgp5ID0gRW1wbG95ZWUoIkhvbWVyIiwgIlNpbXBzb24iLCAyOCwgIjEwMDciKQp5LmNoYW5nZV9pbmZvKCJIYXJyeSIsICJQb3R0ZXIiLCAyMCwgIjMyMiIpCnByaW50KHkuZmlyc3RuYW1lKQ==