min-water
如果一個人不知道他要駛向哪個碼頭,那么任何風都不會是順風。
BlogJava
首頁
新隨筆
聯系
聚合
管理
posts - 17, comments - 14, trackbacks - 0
student
package
gov.school.student;
public
class
Student
{
private
int
stuno;
private
String name;
private
String sex;
private
int
age;
private
int
score;
public
int
getStuno()
{
return
stuno;
}
public
void
setStuno(
int
stuno)
{
this
.stuno
=
stuno;
}
public
String getName()
{
return
name;
}
public
void
setName(String name)
{
this
.name
=
name;
}
public
String getSex()
{
return
sex;
}
public
void
setSex(String sex)
{
this
.sex
=
sex;
}
public
int
getAge()
{
return
age;
}
public
void
setAge(
int
age)
{
this
.age
=
age;
}
public
int
getScore()
{
return
score;
}
public
void
setScore(
int
score)
{
this
.score
=
score;
}
}
package
gov.school.student;
public
class
StudentServer
{
public
static
Student[] getStudent()
{
Student[] student
=
new
Student[
5
];
Student st0
=
new
Student();
st0.setAge(
20
);
st0.setName(
"
老大
"
);
st0.setScore(
95
);
st0.setSex(
"
男
"
);
st0.setStuno(
1001
);
student[
0
]
=
st0;
Student st1
=
new
Student();
st1.setAge(
21
);
st1.setName(
"
老二
"
);
st1.setScore(
92
);
st1.setSex(
"
男
"
);
st1.setStuno(
1002
);
student[
1
]
=
st1;
Student st2
=
new
Student();
st2.setAge(
22
);
st2.setName(
"
老三
"
);
st2.setScore(
76
);
st2.setSex(
"
女
"
);
st2.setStuno(
1003
);
student[
2
]
=
st2;
Student st3
=
new
Student();
st3.setAge(
28
);
st3.setName(
"
老四
"
);
st3.setScore(
60
);
st3.setSex(
"
男
"
);
st3.setStuno(
1004
);
student[
3
]
=
st3;
Student st4
=
new
Student();
st4.setAge(
20
);
st4.setName(
"
老五
"
);
st4.setScore(
85
);
st4.setSex(
"
女
"
);
st4.setStuno(
1005
);
student[
4
]
=
st4;
return
student;
}
}
package
gov.school.student;
public
class
StudentClient
{
public
static
void
main(String[] args)
{
//
TODO Auto-generated method stub
Student stud []
=
StudentServer.getStudent();
String level
=
"
a
"
;
int
q
=
0
,w
=
0
,e
=
0
,r
=
0
,t
=
0
;
for
(
int
i
=
0
;i
<
stud.length;i
++
)
{
if
(stud[i].getScore()
>
90
)
{
level
=
"
A
"
;
q
++
;
}
else
if
(stud[ i].getScore()
>
80
)
{
level
=
"
B
"
;
w
++
;
}
else
if
(stud[ i].getScore()
>
70
)
{
level
=
"
C
"
;
e
++
;
}
else
if
(stud[ i].getScore()
>
60
)
{
level
=
"
D
"
;
r
++
;
}
else
{
level
=
"
E
"
;
}
System.out.println(stud[i].getName()
+
"
"
+
stud[i].getAge()
+
"
歲,性別:
"
+
stud[i].getSex()
+
"
, 學號:
"
+
stud[i].getStuno()
+
"
, 得分:
"
+
stud[i].getScore()
+
"
, 得分等級:
"
+
level
+
"
。
"
);
}
System.out.println(
"
\n
"
+
"
等級為 A 的人數為:
"
+
q);
System.out.println(
"
等級為 B 的人數為:
"
+
w);
System.out.println(
"
等級為 C 的人數為:
"
+
e);
System.out.println(
"
等級為 D 的人數為:
"
+
r);
System.out.println(
"
等級為 E 的人數為:
"
+
t);
}
}
運行結果:
posted on 2010-10-10 18:21
Mineralwasser
閱讀(188)
評論(3)
編輯
收藏
FeedBack:
#
re: student
2010-10-10 18:33 |
Tovep
LZ寫的很好啊!
回復
更多評論
#
re: student
2010-10-10 19:53 |
迷人笑笑
很不錯啊!!前進的這么快!!呵呵--加油!!
回復
更多評論
#
re: student
2010-10-10 22:41 |
Mineralwasser
謝謝@迷人笑笑
回復
更多評論
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Copyright ©2025 Mineralwasser Powered By:
博客園
模板提供:
滬江博客
<
2025年7月
>
日
一
二
三
四
五
六
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
常用鏈接
我的隨筆
我的文章
我的評論
我的參與
最新評論
留言簿
(1)
給我留言
查看公開留言
查看私人留言
文章檔案
(21)
2010年11月 (8)
2010年10月 (13)
搜索
最新評論
1.?re: String的兩種實例化方式的區別
String a=new String();
a="hello";
為何不報錯?
--小學員
2.?re: JAVA流技術(IO編程)
re: JAVA流技術(IO編程)
--re: JAVA流技術(IO編程)
3.?re: String的兩種實例化方式的區別
講的很好。
--jjx
4.?re: String的兩種實例化方式的區別
你對string分析得很具體,到位.
--Ma
5.?re: 構造函數--公司員工信息
3@dan
--死掉
閱讀排行榜
評論排行榜
主站蜘蛛池模板:
一级一黄在线观看视频免费
|
亚洲综合色7777情网站777
|
国产成人亚洲精品电影
|
亚洲中文无码永久免费
|
色在线亚洲视频www
|
一二三四视频在线观看中文版免费
|
亚洲国产日韩女人aaaaaa毛片在线
|
成熟女人特级毛片www免费
|
亚洲午夜成激人情在线影院
|
亚洲黄色片免费看
|
午夜国产羞羞视频免费网站
|
亚洲中文字幕在线乱码
|
亚洲中文字幕一二三四区
|
成人免费无码大片A毛片抽搐色欲
|
亚洲视频无码高清在线
|
好男人资源在线WWW免费
|
国产亚洲色婷婷久久99精品91
|
国产成人高清精品免费观看
|
亚洲人成网77777亚洲色
|
韩日电影在线播放免费版
|
亚洲高清在线观看
|
中文字幕在线免费
|
亚洲一区二区三区写真
|
日韩精品成人亚洲专区
|
亚洲av无码片区一区二区三区
|
毛片a级毛片免费观看品善网
|
亚洲人成人伊人成综合网无码
|
国产精品99久久免费
|
久久精品免费网站网
|
日韩一级视频免费观看
|
五月天婷婷免费视频
|
亚洲国产成人久久综合碰碰动漫3d
|
国产香蕉免费精品视频
|
亚洲av日韩综合一区久热
|
久久精品亚洲男人的天堂
|
蜜桃成人无码区免费视频网站
|
国产成人精品日本亚洲专
|
亚洲成aⅴ人片久青草影院
|
男人j进入女人j内部免费网站
|
亚洲一级特黄特黄的大片
|
国产成人亚洲综合
|