请大神翻译一下这些关于java的题目要求

AddastaticmethodtoVehiclethatreturnsthehighestidentificationnumberusedthusfar。AddatoS... Add a static method to Vehicle that returns the highest identification number used thus far。
Add a toString method to Vehicle。
Make the fields in your Vehicle class private,and add accessor methods for the fields。Which fields should have methods to change them,and which should not?
Add a changeSpeed method that changes the current speed of the vehicle to a passed-in value and add a stop method that sets the speed to zero。
Change Vehicle.main to create cars with owners whose names are specified on the command line,adn then print them。

希望大神能帮我翻译一下这几句关于java的,实在看不懂了,谢谢了
展开
 我来答
00gaojun
2015-09-25 · TA获得超过707个赞
知道小有建树答主
回答量:333
采纳率:0%
帮助的人:156万
展开全部
Add a static method to Vehicle that returns the highest identification number used thus far。
对Vehicle 添加static 方法, 并且 返回 迄今为止的最高 id number.

Add a toString method to Vehicle。
对Vehicle添加toString方法.

Make the fields in your Vehicle class private,and add accessor methods for the fields。
把Vehicle class 的所有fields 都改成private, 并且对他们添加访问方法.

Which fields should have methods to change them,and which should not?
那些fields应该添加可以修改他们的方法, 哪些不可用添加?

Add a changeSpeed method that changes the current speed of the vehicle to a passed-in value and add a stop method that sets the speed to zero。
添加 changeSpeed 方法, 传进一个值用来改变现在的Vehicle speed, 并且添加stop方法来讲speed设置为0.

Change Vehicle.main to create cars with owners whose names are specified on the command line,adn then print them。
修改Vehcile的main方法, 可以使用从command line传输进来的owner name, 来创建cars对象. 并且打印他们.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式