自考题库入口
问答题
在下面程序中的横线处填上适当内容,使程序完整。#includeclassvehicle{protected:intsize;intspeed;public:voidsetSpeed(ints){speed=s;}①___getSpeedLevel{returnspeed/10;}};classcar:pubicvehicle{public:intgetSpeedLeve{returnspeed/5;}};classtruck:publicvehicle{public:intgetSpeedLevel{returnspeed/15;}};intmaxSpeedLevel(vehicle②___,vehicle③___){if(v1.getSpeedLevel>v2.getSpeedLevel)return1;elsereturn2;}voidmain{truckt;carc;t.setSpeed;c.setSpeed;cout<
收藏

答案

解析

加载中...