[英] files

查看:77
本文介绍了档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何解决这个问题?PLIZ帮助,如果你可以

a公司保留一份工资单文件,其中包含以下每位员工的详细信息:姓名,员工

号码,等级(手册,文员,主管或管理人员),工资总额,税金

扣除额和年数和服务月数。这用于

打印工资单,向当局提供税务详情,

计算退休金扣除额和其他员工工资单数据。

需要编写程序来更新工资单文件包括按员工编号订购的新员工的详细信息。假设

员工编号是唯一的。

解决方案

Le 21-02-2007, jo ******** @ yahoo。 com < jo ******** @yahoo.comaécrit*:


我该如何解决这个问题?PLIZ帮助,如果你可以

a公司保留一份包含th的工资单文件以下详细信息

每位员工:姓​​名,员工

号码,等级(手册,文员,主管或管理人员),总薪酬,税金

扣除额和服务年数和月数。这用于打印工资单,打印工资单,向当局提供税务详情,

计算养老金扣除额和其他员工工资单数据。

我需要编写一个程序来更新工资单文件,以包括

按员工编号订购的新员工的详细信息。假设

员工编号是唯一的。



是的,你也应该给我们老师的电子邮件地址,

,我们可以直接给他发电子邮件解决方案。


Marc Boyer


< jo ******** @ yahoo.comwrote:


我该如何解决这个问题?PLIZ帮助,如果你可以

a公司保留一份包含以下详细信息的工资单文件

每个其员工:姓名,员工

号码,等级(手册,文员,主管或管理人员),工资总额,税金

扣除额以及年数和服务月数。用于

打印工资单,向当局提供税务详情,

计算退休金扣除额和其他员工工资单数据。

我需要写一个更新工资单文件的程序,包括

按员工编号订购的新员工的详细信息。假设

员工编号是唯一的。



我很难想象一个组织,其中员工编号

不是唯一的,这就是员工编号是什么。所以忽略那个花絮。


首先想出一个特定员工的结构。然后出现

,以表示所有员工的总和。显然,文件

存在并且仅在外部媒体上运行,在这个时代,它听起来很古老,但也是如此。我希望练习在要求的方式上说更多。我猜你也可以在文件的

末尾添加新员工,无论订购什么。订单是

混乱,但这是粗略的规格。你的程序

只需读取整个文件并在

文件的末尾添加新员工。


< blockquote> jo********@yahoo.com 写道:


我该如何解决这个问题?PLIZ帮助,如果你可以

a公司保留一份包含以下详细信息的工资单文件

每个员工:姓名,员工

号码,等级(手册,文员,主管或管理人员),工资总额,税金

扣除额以及年数和服务月数。这是用于

打印工资单,向当局提供税务详情,

计算退休金扣除和其他员工工资单数据。

我需要写一个程序更新工资单文件以包括

按员工编号订购的新员工的详细信息。假设

员工编号是唯一的。



方法会有所不同,具体取决于工资单的确切格式

文件以及它是文本格式还是二进制格式。如果您的所有新

记录只需要附加在文件的末尾,您只需使用a打开文件
即可。或ab模式。否则你需要使用

文件定位函数,如fseek和rewind,在写入数据之前转到正确的

位置。如果你需要在没有覆盖现有数据的情况下插入数据,你需要基本上重写文件。


how do i go about this?pliz help if you can
a company keeps a payroll file containing the following details for
each of its employees:name,employees
number,grade(manual,clerical,supervisor or managerial),gross pay,tax
deductions and number of years and months of service.This is used for
printing payslips,supplying tax details to the authorities,
calculating pension deduction and other employees payroll data.
am required to write a program to update the payroll file to include
details of new employees ordered by employee number.Assume that
employee number are unique.

解决方案

Le 21-02-2007, jo********@yahoo.com <jo********@yahoo.coma écrit*:

how do i go about this?pliz help if you can
a company keeps a payroll file containing the following details for
each of its employees:name,employees
number,grade(manual,clerical,supervisor or managerial),gross pay,tax
deductions and number of years and months of service.This is used for
printing payslips,supplying tax details to the authorities,
calculating pension deduction and other employees payroll data.
am required to write a program to update the payroll file to include
details of new employees ordered by employee number.Assume that
employee number are unique.

Yes, and you also should give us the email address of your teacher,
the, we could email him directly the solution.

Marc Boyer


<jo********@yahoo.comwrote:

how do i go about this?pliz help if you can
a company keeps a payroll file containing the following details for
each of its employees:name,employees
number,grade(manual,clerical,supervisor or managerial),gross pay,tax
deductions and number of years and months of service.This is used for
printing payslips,supplying tax details to the authorities,
calculating pension deduction and other employees payroll data.
am required to write a program to update the payroll file to include
details of new employees ordered by employee number.Assume that
employee number are unique.

I have a hard time imagining an organization in which the employee numbers
are NOT unique, that''s what an employee number is. So ignore that tidbit.

First come up with a structure for one particular employee. Then come up
with a way to represent the aggregate of all employees. Apparently the file
exists and is operated on, solely from the external medium, which sounds
archaic in this day and age, but so be it. I wish the exercise said more in
the way of requirements. I guess you might as well add new employees at the
end of the file, regardless of what that does to order. The order is
chaotic, but that''s what you get with sketchy specifications. Your program
only has to read the entire file and add the new employee at the end of the
file.


jo********@yahoo.com wrote:

how do i go about this?pliz help if you can
a company keeps a payroll file containing the following details for
each of its employees:name,employees
number,grade(manual,clerical,supervisor or managerial),gross pay,tax
deductions and number of years and months of service.This is used for
printing payslips,supplying tax details to the authorities,
calculating pension deduction and other employees payroll data.
am required to write a program to update the payroll file to include
details of new employees ordered by employee number.Assume that
employee number are unique.

The method would differ depending on the exact format of the payroll
file and whether it''s in text or binary format. If all your new
records need only be appended at the end of the file, you can just
open the file with "a" or "ab" mode. Otherwise you need to use the
file positioning functions like fseek and rewind to go to the proper
position before writing data. If you need to insert data without
overwriting existing data, you need to basically rewrite the file.


这篇关于档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆