求一位英语水平高点的有点计算机C++编程水平把我翻译下面那道题,别帮我做了哦!!

Task 1
Goal:
- Familiarise with development environment
- Simple class syntax

Task:
Implement a Vehicle class. Every Vehicle is characterised by a current speed (integer) and a maximal speed (integer). A Vehicle has the possibility to store maximum 5 features (string). Besides the necessary constructor(s), setters and getters, a Vehicle has some extra methods:
+ bool changeSpeed(int delta): adds delta to currentspeed if new value is in range [0..maxspeed], returns true if currentspeed has been updated.
+ void addFeature(string): adds string to featurelist if space is still available
+ bool removeFeature(string f): removes feature f from featurelist if f is found, shift content of all following features. Returns true if string has been removed.
+ std::string info() which returns a string like
The vehicle is running at speed [currentspeed]
and has [nr. of features] features:
* [feature1]
* ...

Create a test application which instantiates some vehicles, change speed, add and remove features and show output of info() on different situations to check the implementation

任务1
目标:
熟悉与开发环境。- - - - - -
-简单的类语法

任务:
实现一个车辆班。每辆车的特点是当前速度(整数)和最大速度(整数)。一辆汽车有可能储存最大5特征(字符串)。除了必要的构造函数(s),的引领者和getters,车辆一些额外的方法:
changeSpeed + bool(智力三角洲):增加currentspeed三角洲如果新值是0 . .范围[ maxspeed],将返回true currentspeed是否已经更新。
addFeature +无效(字符串):增加featurelist字符串如果空间是可以的
+ bool removeFeature(字符串f):消除特征从featurelist如果f是f发现、轮班的内容,所有的特征。如果字符串返回true;如果被移除。
+性病弦信息(),以字符串的形式返回像
车辆运行速度[currentspeed)
[那么,。功能]的特点:
*[feature1]
*…

创建一个测试的应用程序,instantiates一些车辆,变化速度,添加和删除特点和显示输出信息()的不同情况检查执行情况
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-01-09
不懂英语的程序员伤不起啊 同样不懂得路过

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网