java员工工资管理系统报告 下载本文

内容发布更新时间 : 2024/5/8 16:21:00星期一 下面是文章的全部内容请认真阅读。

responsible for the development of company management, including the development of settlement and settlement standards of preparation, the business unit clearing work inspection and guidance, business settlement audit; 23, is in charge of the company business and costs calculation and analysis of new projects and to develop standards and provide the basis for decision-making and responsible for the comprehensive economic and technical indicators and statistics, analysis, summary and reporting; 24, the company responsible for audits of various types of business contracts, the principal of contract price (purchase price, freight, taxes, etc), payment method, payment, settlement, such as the reasonableness of the data, authenticity, accuracy; 25, strict enforcement of national tax policy, is responsible for the monthly reporting, including tax calculations, statistics, go through the relevant formalities, receive invoices; 26, the company responsible for all kinds of price (including product price, material prices,Freight, engineering machinery jobs price, price, price) 's terms of market surveys, quotations, price exception report; 27, is responsible for the company's management, including conference organized by price, of historical prices, totals, etc; 28, according to the annual operating plan, annual costs and undergo decomposition, control, analysis and evaluation; responsible for costing and cost control, ensure accounting number is reasonable, correct, and complete accounting report and the company's other reports compiled and reported to work;

西 安 邮 电 大 学

(计算机学院)

课内实验报告

实验名称: 员工工资管理系统

专业名称: 计算机科学与技术 班 级: 计 科 1103 学生姓名: 武 杨

学号(8位): 指导教师: 张荣

实验日期: 2013-11-15 -2013-12月13日

responsible for the development of company management, including the development of settlement and settlement standards of preparation, the business unit clearing work inspection and guidance, business settlement audit; 23, is in charge of the company business and costs calculation and analysis of new projects and to develop standards and provide the basis for decision-making and responsible for the comprehensive economic and technical indicators and statistics, analysis, summary and reporting; 24, the company responsible for audits of various types of business contracts, the principal of contract price (purchase price, freight, taxes, etc), payment method, payment, settlement, such as the reasonableness of the data, authenticity, accuracy; 25, strict enforcement of national tax policy, is responsible for the monthly reporting, including tax calculations, statistics, go through the relevant formalities, receive invoices; 26, the company responsible for all kinds of price (including product price, material prices,Freight, engineering machinery jobs price, price, price) 's terms of market surveys, quotations, price exception report; 27, is responsible for the company's management, including conference organized by price, of historical prices, totals, etc; 28, according to the annual operating plan, annual costs and undergo decomposition, control, analysis and evaluation; responsible for costing and cost control, ensure accounting number is reasonable, correct, and complete accounting report and the company's other reports compiled and reported to work;

一. 实验目的及实验环境

通过本实验,深刻体会面向对象程序设计的思想,应用面向对象的概念和技术,掌握用Java进行程序设计的方法。

学习和使用Java常用类,学会使用Java类库尽可能代码复用。

综合运用《Java语言程序设计B》课程所学内容, 学会将知识应用于实际的方法,提高分析和 解决问题的能力。

利用文件永久存储和管理员工信息; 项目名称:员工工资管理系统; 项目使用者:员工管理员;员工;

Win764位,IDE:Myeclipse8.5控制台应用程序 二. 实验内容

实现简单的员工工资管理系统,实现员工个人信息的录入,查询,删除,修改等基本操作,用文件永久存储信息; 三.方案设计

利用控制台显示简单提示信息,文件存储在E:\\file\\wage.txt,文件采用一条信息一行存储(便与后续操作),

1、 需要编写一个类wage类用来表示员工,员工属性主要有员工号WID,姓名WName,性别WSex,工资WPay

private String WID; private String WName; private String WSex; private String WPay;

2、文件操作:

文件输出流FileOutputStream实现文件的写操作,字符缓冲类BufferedReader实现读入写入数据的一个缓冲 3、主要操作: 增加:

实现员工个人信息的添加,用回车表示一项信息的完成代码如下: public void Add() throws IOException {

System.out.println(\请输入WID,WName,WSex,WPay(以回车隔开)\); Scanner sreader = new Scanner(System.in); FileOutputStream fs = new

FileOutputStream(\, true); if (sreader.hasNext()) {

RandomAccessFile randomFile = new RandomAccessFile( \, \);

// 文件长度,字节数

long fileLength = randomFile.length();

// 将写文件指针移到文件尾。

randomFile.seek(fileLength); randomFile.writeBytes(\);

randomFile.writeBytes(sreader.next());

randomFile.writeBytes(\ + sreader.next());

responsible for the development of company management, including the development of settlement and settlement standards of preparation, the business unit clearing work inspection and guidance, business settlement audit; 23, is in charge of the company business and costs calculation and analysis of new projects and to develop standards and provide the basis for decision-making and responsible for the comprehensive economic and technical indicators and statistics, analysis, summary and reporting; 24, the company responsible for audits of various types of business contracts, the principal of contract price (purchase price, freight, taxes, etc), payment method, payment, settlement, such as the reasonableness of the data, authenticity, accuracy; 25, strict enforcement of national tax policy, is responsible for the monthly reporting, including tax calculations, statistics, go through the relevant formalities, receive invoices; 26, the company responsible for all kinds of price (including product price, material prices,Freight, engineering machinery jobs price, price, price) 's terms of market surveys, quotations, price exception report; 27, is responsible for the company's management, including conference organized by price, of historical prices, totals, etc; 28, according to the annual operating plan, annual costs and undergo decomposition, control, analysis and evaluation; responsible for costing and cost control, ensure accounting number is reasonable, correct, and complete accounting report and the company's other reports compiled and reported to work;

}

randomFile.writeBytes(\ + sreader.next()); randomFile.writeBytes(\ + sreader.next()); randomFile.close(); }

删除:

输入员工号,删除这个员工号对应的员工信息 修改:

输入员工号,修改这个员工号对应的员工信息 查询:

输入员工号,显示这个员工号对应的员工信息 代码如下:

public void Search() throws IOException {

System.out.println(\请输入员工的员工号\); Scanner sreader = new Scanner(System.in); File file = new File(\); BufferedReader reader = new BufferedReader(new FileReader(file));

String q = sreader.next(); int line1 = 0;

String line2 = null; int flag=0;

while ((line2 = (reader.readLine())) != null) { String[] str = line2.split(\); if (str[0].compareTo(q) == 0) { System.out.println(line2); flag=1; }

line1++; }

if(flag==0)System.out.println(\不存在\); }

4、写一个play()函数 实现简单的用户提示语:

四.测试数据及运行结果