Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the salary Management system of staff and Workers in C++

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to realize the employee salary management system on C++". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "C++ how to achieve employee payroll management system" it!

Wage management system for staff and workers

Functional design requirements

1. Input record: take the name and ID number of each employee as well as the data of basic salary, post salary, post allowance, medical insurance and provident fund as a record. The software can create a new data file or add records to established data files.

two。 Display record: display the salary and average salary of one or more employees according to the records provided by the user or the name of the employee.

3. Modify the record: you can modify the data of any record in the data file and display the contents of the record before and after modification.

4. Find the record: you can find the data of any record in the data file and display the record content before and after the search.

5. Delete record: any record in the data file can be deleted.

6. Statistics: (a) calculate the average wage and total wage of each wage, and (B) count the number of employees and their percentage in the total number of staff and workers who meet the specified conditions (such as the sum of the first three items of wages of more than 3000 yuan, 3000 to 2000 yuan, 2000 to 1000 yuan). (C) print the wage information table of all staff and workers and the average wage (including the total average wage) in the form of a character form.

7. Save data file function.

Here are the functions of the program I designed

Function module

1. Main function main (void): call the designer's related information function, call the Menu () function, and realize the main function processing of the system.

two。 Main menu Menu () function: determine how to select the desired function, call data input, display, search, add, delete, modify, save and other functions to complete the data processing of the employee salary management system.

3. Data input Input (): complete the addition of employee information

4. Data modification function update (): modify employee salary and other information data

5. Data deletion function Delete (): delete employee information data

6. Data search function select (): find a certain employee's salary and other information.

7. Data statistics function tongji (): statistics of the number of employees

8. Data display function print (): displays the employee information data

9. File saving function Save (): saves the employee information entered to a file

10 file reading function Read (): read employee information from the file

The flow chart of the code

Implementation of the code

Header file:

# ifndef _ _ MONEY__#define _ _ MONEY__# include # include # include using namespace std # define MAX_NAME 10 staff.dat / define the maximum length of the name # define START 3 staff.dat / initialize the space created for the employee # define ADD 5max / each additional space for the employee # define FILENAME "staff.dat" / / File name / / define an employee class class Staff {public: / / display employee information void print () {cout

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report