Question: You will create a C++ program that keeps track of employees at a company. Three types of users can access the system: Human Resources, Management,
You will create a C++ program that keeps track of employees at a company. Three types of users can access the system: Human Resources, Management, and General Employees. A Human Resources user will be able to add, view, search, modify, and delete employees. A Management user can only search and view employees. A General Employee user can only view his or her own file. Employee files will have at least the employee's name and numeric user id.
- Your program will implement a management information system.
- The minimum requirements of the system are: implement a base employee class that will be defined for each employee type or function, implement a log-in feature, and the login will determine what functions are accessible to the employee.
- The program will be interactive. At a minimum, a log-in screen and menu screen will be used. Input should be validated for correct login credentials.
- Functions and classes should be used where appropriate to produce readable, reusable code. Library functions and user-defined functions should be used where appropriate
Some simple rules to follow to make your code more readable:
- Use indentation or spacing consistently. (e.g., every line in a loop is indented to align)
- Add whitespace to help separate parts of the code. (e.g., empty line after a loop, space after a semicolon in a loop, etc.)
- Give meaningful names to variables. Variables named x, y, and z are not descriptive and give the reader no information about their purpose; instead use names like primary, max, and counter. Loop condition variables are an exception because they are contained to a single area of the code and have a universally known function, so naming with a single letter (i, j, etc.) is acceptable.
- Code should be organized into functions so that segments of code that are reused are placed within functions. Function definitions should be contained in a single section of the program. Functions, like variables, should have meaningful names.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
