: : (nameage): .name = name .__age = age (say): (% say) (): (% (.name.__age)) .__speek() (): a = A() a.speek() (a.name) (a._A__age) a._A__age += (a._A__age) (A): (nameagesex): A.(nameage) .sex = sex (): (% (.name.sex)) A.speek() b = B() b.speek() : (): () (BC): (nameagesex): B.(nameagesex) (): (): () d = D() d.run(); d.speek(); d.say()
时间: 2024-10-11 02:13:47