请大神翻译一下这些关于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的,实在看不懂了,谢谢了 展开
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的,实在看不懂了,谢谢了 展开
展开全部
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对象. 并且打印他们.
对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对象. 并且打印他们.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询