++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Due: Oct 25rd, midnight +
+ Submit [login to view URL] and [login to view URL] +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Your Task :
This lab is to use class to simulate employee records, load employee
information from a text file to a vector of class objects(similar to
structs, but class do not have public access for private members.
You need to call the “SET” functions from class objects to assign the
values to private memebers and push_back the class object into the
vector).
(1) You are given a [login to view URL] and an employee class (employee.h and [login to view URL]).
The specification file for the employee class is provided;
The employee class .h file is
class employee{
public:
employee();//default constructor
void SetName(string strIn);//set the name
void SetPassword(string strIn);// set password using
strIn
void SetLoginID(string strIn);//set the user ID
void SetSalary(int valIn);//set the salary
void SetPosition(position pIn);//set the position
void print();//print employee information
bool userIDChecking(string IDIn);//return true if ID
match with employee user ID
bool passwordChecking(string passIn);//return true if
passIn match with employee password
bool IsManager(); //return true if employee is manager,
else return false
private:
string Name;
string Password;
string UserID;
int salary;
position myPosition; 2
};
For [login to view URL], the constructor and SetLoginID functions are done. You need to provide
the code for rest of the public functions.
(2) The [login to view URL] is to use a] vector to hold all the data from a data file.
When loading the data from file to vector, you should use push_back function from vector
insert every record from file into the global vector called dataSet.
The datafile contains several records, starting with an integer indicating how many records in the
file. Each record is made up with
Name
Login ID
Password
Salary
An integer (0 means staff, 1 means manager).
So, after the vector is loaded. It contains all employee objects. The program will ask user to input
the ID and password, if there is a math the information of that user will be print out on the screen.
If that user is manager, that user can have all the staff information on the screen.
(3) For [login to view URL], you need to provide the code for two functions, do not change other part.
void LoadVector(string fileName, vector &vIn);
//loading function, load the data from file named filename
to vector vIn
int loginCheck(string ID, vector vIn);
//check user input ID on vector, return valid index in the
vector if there is a match, else return -1
Sample screenshots 3
Hi, I read your complete statement and I am computer science graduate with strong programming skills in c/c++. Looking forward for your response to start this project. Thank you.
Hi~~ I'm Computer Science master student, with over 5 years of experience in C++ projects. Your project is very easy. I can finish it in several hours.
Hey hi, I am working at a research institute and a experienced programmer. I have been writing C++ modules for my lab for various scientific simulations. Got, good technical knowledge with coding. I can deliver excellent results for you. Thank you. Regards, Gade.
This is trivial i guess is not real-life project is a college task, i can guarantee over 65% (probably more B - A class) mark. I can do it by tonight. check PMB as well.