virtual polymorph,inheritance