全文预览

C、C编程题目和代码4

上传者:hnxzy51 |  格式:pdf  |  页数:52 |  大小:3866KB

文档介绍
\rusingnamespacestd;\rclassCVehicle\r(\rprotected:\rintmax_speed,speed,weight;\rpublic:\rCVehicle(intms,ints,intw):max_speed(ms),speed(s),weight(w){}\r~CVehicle(){}\rvoiddisplay()\r(\rcout<<"Vehicle:"<<endl;\rcout<<"max_speed:"<<max_speed<<endl;\rcout<<"speed:"<<speed<<endl;EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rcout<<"weight:"<<weight<<endl;\rcout<<endl;\r)\r)S\rlllllllllllllllllllllllll\rclassCBicycle:virtualpublicCVehicle\r(\rprotected:\rintheight;\rpublic:\rCBicycle(inth,intms,ints,intw):height(h),CVehicle(ms,s,w){}\r~CBicycle(){}\rvoiddisplay()\r(\rcout<<"Bicycle:"<<endl;\rcout<<"max_speed:"<<max_speed<<endl;\rcout<<"speed:"<<speed<<endl;\rcout

收藏

分享

举报
下载此文档