package exercise; import java.io.*; class staffInfo //职工类 { public String name; public String num; public String sex; public String age; public String record; public String position; public String wanges; public String tel; public String addr; } public class StaffInfomation //实现部分 { public static void main(final String[] args) throws IOException { staffInfo staffOne[]=new staffInfo[100]; for(int j=0;j<100;j++) staffOne[j] = new staffInfo(); final ways staffTwo=new ways(); staffTwo.caidan(staffOne); staffTwo.creat(staffOne); staffTwo.output(staffOne); staffTwo.search(staffOne); staffTwo.delete(staffOne); } } class ways //方法类,主要实现职工信息的建立,显示,查找,删除,信息的保存与读取;这个类是整个程序的操作类。 { public String recordkey; public int i=0;//i用来存放职工的人数 public String filename="Infomation.txt"; BufferedReader buf=new BufferedReader(new InputStreamReader(System.in)); void caidan(staffInfo staffOne[]) throws IOException { final BufferedReader buf=new BufferedReader(new InputStreamReader(System.in)); //此处是JAVA语言中输入数据的基本格式,功能有如C中的scanf函数 int choice; do{ System.out.println("┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"); System.out.println("┃★ ★★ ★ ★★ ★ ★职工管理系统主菜单界面★ ★ ★★ ★ ★★ ★┃"); System.out.println("┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫"); System.out.println("┃ ★ ★ ★ 1.输入职工信息 ★ ★ ★ ┃"); System.out.println("┃ ★ ★ ★ 2. 预 览 职 工 信 息 ★ ★ ★ ┃"); System.out.println("┃ ★ ★ ★ 3.查找职工信息 ★ ★ ★ ┃"); System.out.println("┃ ★ ★ ★ 4.删除职工信息 ★ ★ ★ ┃"); System.out.println("┃ ★ ★ ★ 5.读取已存数据 ★ ★ ★ ┃"); System.out.println("┃ ★ ★ ★ 6. 安 全 退 出 系 统 ★ ★ ★ ┃"); System.out.println("┗━━━━━━━━━━━━━...