当前位置:文档之家› 职工信息管理系统java源代码

职工信息管理系统java源代码


staffOne[j].
age =();
staffOne[j].
record =();
staffOne[j]. staffOne[j]. staffOne[j].
position =(); wanges =(); tel =();
staffOne[j]. }
addr =();
();
"\n 数据已经成功读取! " ); }
" 电话 :" ); staffOne[ i ]. tel =();
" 住址 :" ); staffOne[ i ++;
i ]. addr =();
" 请输入下一个职工信息 :" ); staffOne[ i ]. name =();
}
}
void output(staffInfostaffOne[])
" 性别 :" ); staffOne[
i ]. sex =();
" 年龄 :" ); staffOne[ i ]. age =();
" 学历 :" ); staffOne[ i ]. record =();
" 职位 :" ); staffOne[ i ]. position =();
" 工资 :" ); staffOne[ i ]. wanges =();
wanges ;
staffOne[k]. staffOne[k].
tel =staffOne[k+1]. addr =staffOne[k+1].
tel ; addr ;
}
i --; ame +"\n" );
(staffOne[k].
num +"\n" );
(staffOne[k].
sex +"\n" );
" ┃★★★ 6. 安全退出系统★★★┃ " );
" ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
" );
" 请输入您需要的功能代号 (1--6):" ); choice=());
switch (choice){
case 1:creat(staffOne); case 2:output(staffOne);
package exercise;
.*;
class staffInfo
入职工信息★★★┃ " );
" ┃★★★ 2. 预览职工信息★★★┃ " );
" ┃★★★ 3. 查找职工信息★★★ " ┃★★★ 4. 删除职工信息★★★
┃ " ); ┃ " );
" ┃ ★★★ 5. 读取已存数据★★★┃ " );
position +"\t\t" addr + "\n" );
+staffOne[j].
flg= false ;
} }
if (flg)
" 对不起,查无此人! " ); }
void delete(staffInfostaffOne[]) {
throws IOException
final BufferedReaderbuf=
void creat(staffInfostaffOne[])
throws IOException
{
final BufferedReaderbuf=
new BufferedReader(
new InputStreamReader);
" 请输入职工信息(以 0 结束 )\n" );
" 姓名 :" ); staffOne[ i ]. name =(); "0" )!=0) um=();
} void search(staffInfostaffOne[]) {
throws IOException
final BufferedReaderbuf=
new BufferedReader(
new InputStreamReader);
" 请输入您要查找的职工工号 recordkey =();
:" );
();
" 系统已经安全退出!感谢您的使用! " ); (0);
} void read(staffInfostaffOne[])
throws IOException
{
final FileReaderfr=
new FileReader( filename );
final BufferedReaderbfr=
num ))
{
for ( int k=j;k<= i -1;k++) ame=staffOne[k+1].
name ;
staffOne[k]. staffOne[k].
num =staffOne[k+1]. sex =staffOne[k+1].
num ; sex ;
staffOne[k].
age =staffOne[k+1].
age ;
age +"\t" +s wanges +"\t"
staffOne[k].
record =staffOne[k+1].
record ;
staffOne[k].
position =staffOne[k+1].
position ;
staffOne[k].
wanges =staffOne[k+1].
(staffOne[k].
age +"\n" );
(staffOne[k]. (staffOne[k].
record +"\n" ); position + "\n" );
(staffOne[k].
wanges +"\n" );
(staffOne[k]. (staffOne[k]. }
tel +"\n" ); addr + "\n" );
tel + "\t" +staffOne[j].
addr +"\n" );
"----------------------------------------------------------------------
---------------------------"
);
}
" 没有职工信息! " ); }
throws IOException um+ "\t" +staffOne[j].
sex +பைடு நூலகம்
t" +staffOne[j].
age + "\t" +staffOne[j].
record + "\t" +staffOne[j].
position + "\t\t
" +staffOne[j].
wanges +"\t" +staffOne[j].
new BufferedReader(
new InputStreamReader);
" 请输入您要删除的职工工号 recordkey =();
:" );
boolean flg= true ; for ( int j=0;j< i ;j++)
{
" 输入的工号为 :" + recordkey );
if (staffOne[j].
break ; break ;
case 3:search(staffOne);
break ;
case 4:delete(staffOne); case 5:read(staffOne);
break ; break ;
case 6:save(staffOne); }
break ;
}
while (choice!=0); }
}
new BufferedReader(fr);
if (( recordkey =())!= null )
i =( recordkey );
for ( int j=0;j< i ;j++) {
staffOne[j].
name =();
staffOne[j].
num =();
staffOne[j].
sex =();
boolean flg= true ; for ( int j=0;j< i ;j++)
{
if (staffOne[j].
num )) um+ "\t" +staffOne[j].
sex + "\t" +staffOne[j].
taffOne[j]. +staffOne[j].
record +"\t" +staffOne[j]. tel + "\t" +staffOne[j].
相关主题