:TA(teacher t1,people p,string su,int c,string pr,string de):people(p),graduate(t1,p,c,su),teacher(p,pr,de)Р{Р}Рvoid TA::Show()Р{Р?graduate::Show();Р?cout<<"职务:"<<teacher::GetPrincipalship()<<endl;Р?cout<<"部门:"<<teacher::GetDepartment()<<endl;Р}?Рint main()Р{Р?cout<<"Student:"<<endl;Р?people a1("001","小明","男",1990,2,28,"201313138064");Р?student b(a1,30) ;Р?b.Show();Р?cout<<endl;Р?Р?cout<<"Teacher:"<<endl;Р?people a2("002","小红","女",1991,5,12,"201313138065");Р?teacher c(a1,"助教","武汉科技大学");Р?c.Show();Р?cout<<endl;Р?Р?cout<<"Graduate:"<<endl;Р?people a3("003","小李","男",1990,4,28,"201313138066");Р?graduate d(c,a3,30,"软件工程");Р?d.Show();Р?cout<<endl;Р?Р?cout<<"TA:"<<endl;Р?people a4("004","老王","男",1980,7,8,"2198080808067");Р?TA e(c,a4,"软件工程",30,"教授","武汉科技大学");Р?e.Show(); Р?return 0;Р}Р程序运行结果:РUML图: