importjava.io.*;classPerson{publicvoidprint(){System.out.print("Person");}publicvoidprintMyGender(Strings){this.print();System.out.print(s+"");}}classGender{Stringtype="gender";publicvoidprint(Personp){p.printMyGender(type);}}classFemaleextendsGender{publicFemale(){type="female";}}classMaleextendsGender{publicMale(){type="male";}}classEmployeeextendsPerson{publicvoidprint(){System.out.print("Employee");}}classManagerextendsEmployee{publicvoidprint(){System.out.print("Manager");}}publicclassTest{publicstaticvoidmain(String[]args){Managerman=newManager();Employeeem=newEmployee();Gendergender1=newMale();Gendergender2=newFemale();gender1.print(man);gender2.print(em);}}对于以上代码,其运行结果是
A
A.Person male Person female
B
B.Person gender Person gender
C
C.Manager male Employee female
D
D.Manager gender Employee gender