Topic: 我是刚学JAVA`这道题目我想了好久都不知道怎么搞``大家帮帮忙`!

  Print this page

1.我是刚学JAVA`这道题目我想了好久都不知道怎么搞``大家帮帮忙`! Copy to clipboard
Posted by: hobbyfish
Posted on: 2005-06-18 09:32

编写1个测试程序.要求(1)输出1个车牌为"B54321',最大载重量为5000.0,开客为3人的人货车的详细情况(2)如果你要对当前载客量属性进行改变,并设置只允许在1--4人.请问如何修改程序!!

2.Re:我是刚学JAVA`这道题目我想了好久都不知道怎么搞``大家帮帮忙`! [Re: hobbyfish] Copy to clipboard
Posted by: why
Posted on: 2005-06-18 10:25

Where is the program (source) / interface to be written the test cases for?

3.Re:我是刚学JAVA`这道题目我想了好久都不知道怎么搞``大家帮帮忙`! [Re: hobbyfish] Copy to clipboard
Posted by: HexUzHoNG
Posted on: 2005-06-25 11:23

class Car {
private String 车牌;
private String 最大重量;
private String 开客; //what is 开客?

public void set车牌(String 车牌) {
this.车牌 = 车牌;
}

public void set开客(int 开客) {
if (开客 >= 1 || 开客 <= 4)
this.开客 = 开客;
}

//some set/get method.
}

//^__^,此贴搞笑用... 原来看到一本国人写的java实例书籍,里面的变量,方面全是中文,看起来好别扭.

4.Re:我是刚学JAVA`这道题目我想了好久都不知道怎么搞``大家帮帮忙`! [Re: HexUzHoNG] Copy to clipboard
Posted by: loveapple
Posted on: 2005-06-26 17:44

HexUzHoNG wrote:
class Car {
private String 车牌;
private String 最大重量;
private String 开客; //what is 开客?

public void set车牌(String 车牌) {
this.车牌 = 车牌;
}

public void set开客(int 开客) {
if (开客 >= 1 || 开客 <= 4)
this.开客 = 开客;
}

//some set/get method.
}

//^__^,此贴搞笑用... 原来看到一本国人写的java实例书籍,里面的变量,方面全是中文,看起来好别扭.


那是为了让初学者更容易理解程序的内容,
没什么好笑的

5.Re:我是刚学JAVA`这道题目我想了好久都不知道怎么搞``大家帮帮忙`! [Re: hobbyfish] Copy to clipboard
Posted by: hobbyfish
Posted on: 2005-07-06 13:59

哈哈``谢谢``!!大鸟


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923