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 personnel Information Management system of Colleges and Universities with C++

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to use C++ to realize the university personnel information management system", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to use C++ to realize the university personnel information management system.

Problem description and functional requirements

1. Problem description

There are four types of staff in a university: teachers, experimenters, administrators, teachers and administrators; the common information includes: number, name, gender, age and so on. Among them, the teacher also contains information: the department, specialty, professional title; the experimenter also contains information from: laboratory, position; administrative staff also contains information: political outlook, professional title and so on.

2. Functional requirements

(1) add function: the program can add records of the above four types of personnel at will, provide a selection interface for users to select the categories of personnel to be added, and require the number of employees to be unique, if duplicate numbered records are added, prompt data to add duplicates and cancel the addition.

(2) query function: the added records can be queried according to the number, name and other information. if not found, the corresponding prompt information is given, and if found, the corresponding record information is displayed.

(3) display function: all records in the current system can be displayed, and each record occupies a row.

(4) Editing function: the corresponding records can be modified according to the query results, and pay attention to the uniqueness of the number when modifying.

(5) deletion function: it mainly deletes the added personnel records. If there is no corresponding personnel record in the current system, the prompt "record is empty!" And return to the operation; otherwise, enter the number or name of the person to be deleted, delete the personnel record according to the entered information, and prompt that the corresponding record does not exist if the personnel information is not found.

(6) Statistical function: personnel statistics can be carried out according to a variety of parameters. Can count the number and total number of four categories of personnel, and count the number of male and female employees.

(7) Save function: all kinds of personnel records in the current system can be stored in files in any way.

(8) Reading function: the personnel information saved in the file can be read into the current system for users to use.

Code implementation with comments

Don't talk nonsense, direct code, welcome to correct.

# include "iostream" # include # include "stdlib.h" # define MAX 100using namespace std;class person / / define the basic information shared by a class implementation {public: int num; char name [20]; char sex [4]; int age;}; / / Teacher classclass Teacher:virtual public person {public: char dept [20]; char special [20]; char title [20]; void Input () / / enter information {coutnum; coutname; coutsex; coutage; coutdept; coutspecial; couttitle } void Output () / / output information {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