Question
Employee Database Your Program Must: Load the employees from the provided file o They must be stored in a map, where the key is the
Employee Database
Your Program Must:
Load the employees from the provided file o They must be stored in a map, where the key is the username of the employee and the value is the data for the employee
Give the user an interface to log in with a username and password o If it matches one of the entries from the file, output the data for that user o If it does not match, show an error message
If a user logs in and isManager for their profile is set to true: o
Employee Struct
struct Employee
{
char username[50]; char password[50]; int id;
char fullname[70]; double salary; bool isManager;
};
Show a list of all employees
Log logins and failed login attempts to a file named access.log o The existing contents of the file should be preserved between runs of the program
Example Input and Output elcome to the employee management system! Username: Password: jdoe passwd User found Your Profile: User ID: 101 Name: John Doe Salary: $650e0 Username: Password: mgarcia qwertyu Listing all employees: User ID: 152 Username: dsmith ame: David Smith Salary: $70000 User ID: 338 Username: imartinez Name: Isabella Martinez Salary: $65000 User ID: 101 Username: jdoe Name: John Doe Salary: $656e0 User ID: 32e Username: jjohnson ame: Ji11 Johnson Salary: $60000 User ID: 214 Username: mgarcia Name: Mary Garcia Salary: $80000 User ID: 321 Username: msmith Name: Mark Smith Salary: $55000Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started