时间:2024-10-19 11:49:22
1、在已新建的python文件中,定义类Adata,并创建构造函数__init__
3、再定义类Bdata,并创建构造函数,传入参数type和sun
5、对类Cdata进行实例化,依次调用showBdata和showNum