SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 1 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
TABLE OF CONTENTS 
S. No. Page No. 
Acknowledgement ...................................................................................................................... 2 
1. Introduction ............................................................................................................................ 3 
2. Project Description................................................................................................................. 4 
2.1. Login Module .................................................................................................................. 4 
2.2. Administration Module ................................................................................................... 4 
2.3. Employee Module ........................................................................................................... 4 
2.4. Identity Card (IC) Number Generation Module .............................................................. 4 
2.5. Record Searching Module ............................................................................................... 5 
3. Description and Justification .................................................................................................. 6 
3.1. Design of the Implemented Code .................................................................................... 6 
3.2. Implementation Code in terms of OOP Concepts ......................................................... 11 
3.3.Validation Code Applied in the Implementation Code .................................................. 16 
4. UML Diagrams .................................................................................................................... 20 
4.1. Class Diagram ............................................................................................................... 20 
4.2. Use Case Diagram ......................................................................................................... 21 
5. Output Screens ..................................................................................................................... 22 
6. Conclusion ........................................................................................................................... 33 
7. References ............................................................................................................................ 34
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 2 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
ACKNOWLEDGEMENT 
To acknowledge and thank every individual who directly or indirectly contributed to this venture personally, it would require an inordinate amount of time. I am deeply indebted to many individual, whose cooperation made this job easier. I am thankful and express my sincere gratitude to APIIT SD INDIA, Panipat for providing me an opportunity for fulfilling my most cherished desire. 
I avail this opportunity to express my gratitude to my friends and my parents for their support and encouragement throughout project. I feel it is as a great pleasure to express my deep sense of profound thank to Module Lecturer Mrs. Pradeep Kumar, who guided me at every step and also encouraged to carry out the project. 
Lastly, I would like to thank all those whose names may not have appeared here but whose contribution has not gone unnoticed. 
Jayant Kumar Gope 
Intake No.: PT1282240
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 3 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
1. INTRODUCTION 
The objective of this assignment is to develop a Win32 console application for an Employee Management System, where it is expected to enter, search, edit and view personnel information of the Employee in an Organization based on different access priority and calculate their salary package. 
We are required design the application by assuming that, this system will be installed only in one terminal and used by all types of users, specially the Employee and the administrator of this application. The main purpose of this application is to store and edit the complete personal record of each Employee along with evaluation of salary (annually) in an organization. And all information that is to be added and edited must be handled via text (.txt) or data (.dat) file, so that the information can be uploaded back into the system once activated or saved when the system is exited. 
We are also required to incorporate the Validation throughout the application for each entry, from the user in order to avoid logical errors. 
We are supposed to describe, justify and implement an object oriented system by the application, 
Introduce current technical issues in the field of object oriented programming (OOP). Thus, predominantly our implementation code is expected to highlight the use of object oriented programming principles (OOPS) such as: 
 Class 
 Abstraction 
 Inheritance 
 Polymorphism
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 4 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
2. PROJECT DESCRIPTION 
The project is evaluated deeply and it is discovered that, this project contains certain modules that needs to be incorporated in the system design. So, for getting the better understanding of the project, these modules are described below – 
2.1. Login Module 
It is one of the most important modules of the Employee Management System. Each Employee of the system has to be assigned its own username and password. And the assigning job is to be performed by the administrator. 
The login module chiefly contains: 
 Administrator Login 
 Employee Login 
2.2. Administrator Module 
The administrator of the application has to be provided the highest access priority which enables him/her to perform all the functionalities that exist in the application. In addition to that, the administrator is able to register Employee. 
The administrator is allowed to: 
 Register Employee as users of the system. 
 Add, search and edit personal information of Employee. 
 Delete record of any Employee. 
 Calculate salary package of Employees. 
2.3. Employee Module 
The Employee in this application has the lowest access priority that only enables him/her to only view the personal information and the annual salary. 
2.4. Identification Card (IC) Number Generation Module 
Each employee in the application has to be assigned with its unique Identification Card (IC) Number by which the employee can be identified uniquely for the operations and this is automatically generated by the system.
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 5 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
2.5. Record Searching Module 
The searching of any record in the system must be done by using the following categories: 
 IC Number 
 Designation 
 Department
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 6 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
3. DESCRIPTION AND JUSTIFICATION 
3.1. Design of The Implementation Codes 
 Description 
In this Employee Management System, it has been already stated that, administrator has the highest access priority that means he can perform each and every functionality specified in the system. The functionalities he can perform includes add employee, register employee so that employee can access the system, search, update, delete the information of employees and can calculate salary of the employees. 
And the lowest access priority is given to the employee who can only view his own profile and annual salary. 
 Justification 
As the access priorities of different users is being discussed- 
a) Administrator given the highest priority in System 
Justification - As we know that administrator of any organization has got all the privileges and rights, so we also followed the same criteria in the system and provided the administrator the highest priority amongst all users. 
b) Employees given the Least Priority 
Justification – Generally, the employee of any organization has not to do a lot with the management system, as it is made for maintaining the organization data. So, employee in the system is given the less priority than admin. 
c) Use of Functions Justification – Large programs are difficult to manage as a single list of instructions. Thus, large programs are divided into smaller parts known as functions. A function is a group of statements that together perform a task. The functions can be invoked (Called) from other parts of the program. The most important reason that we have used functions in a program because they make the program handling easier. 
void employeeAccess::viewEmployee() // Function Definition 
{ 
system("cls");
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 7 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
cout<<"n"<<setw(54)<<right<<"---------------------------"; 
cout<<"n"<<setw(53)<<right<<" VIEW EMPLOYEE PROFILE "; 
cout<<"n"<<setw(54)<<right<<"---------------------------"; 
ifstream fin; 
fin.open("employeeDetails.txt",ios::in|ios::binary); 
if(!fin) 
cout<<"File not found"; 
else 
{ 
showHeading(); //function Call 
fin.read((char*)this,sizeof(*this)); 
while(!fin.eof()) 
{ 
showEmployeeTable(); //function callS 
fin.read((char*)this,sizeof(*this)); 
} 
} 
fin.close(); 
} 
d) Use of File Handling 
Since, we were required to store all the information that is added and edited in the text file, so that the information can be uploaded back into the system once activated or saved when the system is exited. And through file handling, operations like create, modify, delete etc can be performed thus file handling is used. 
Below given snippet is of adding an employee in the project - 
void employeeAccess::addEmployee() 
{ 
system("cls"); 
cout<<"n"<<setw(54)<<right<<"--------------------------"; 
cout<<"n"<<setw(53)<<right<<" ADD EMPLOYEE PROFILE "; 
cout<<"n"<<setw(54)<<right<<"--------------------------"; 
ifstream fin; 
employeeAccess temp; 
int id = 0; 
fin.open("employeeDetails.txt",ios::in|ios::binary); //opening file 
if(!fin) 
{ 
id = id+1; 
} 
else 
{ 
fin.read((char*)&temp, sizeof(temp)); //reading from file 
while(!fin.eof()) 
{ 
id=temp.eICNumber; 
fin.read((char*)&temp, sizeof(temp)); //reading from file 
} 
id++; 
} 
eICNumber = id; 
getEmployeeDetails();
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 8 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
ofstream fout; 
fout.open("employeeDetails.txt",ios::out|ios::app|ios::binary); 
if(!fout) 
cout<<"File can not open"; 
else 
fout.write((char*)this, sizeof(*this)); //writing to the file 
cout<<"n"<<setw(68)<<right<<"__________________________________________ _________"; 
cout<<"nn"<<setw(50)<<right<<" EMPLOYEE ADDED "; 
fout.close(); 
cin.get(); 
cin.get(); 
adminOptions(); 
} 
e) Use of Control Structures 
Control structures controls the flow of the program. Basically there are three types of control structures – 
i) Sequential : 
In sequential structure, the programs are executed sequentially in which they are written. sequential structure specifies the normal flow of the program. 
ii) Selection : 
The selection structure means the execution of statements depends upon the condition test. If the condition comes out to be true then, a set of statements will be executed otherwise another set of statements will be executed. C provides three types of Selection Structures. 
a) if Statement : 
This (if) statement performs the actions only, when the condition comes out to be true and skips the statements when condition becomes false. 
Below is the code given for calculating the salary - 
double basicSalary, finalSalary; 
if(eDesignation == "CEO") 
{ 
basicSalary= 50000; 
finalSalary = basicSalary + (0.70 * basicSalary) + (basicSalary * 0.20); 
} 
else if(eDesignation == "MD") 
{ 
basicSalary= 35000; 
finalSalary = basicSalary + (0.50 * basicSalary) + (basicSalary * 0.20); 
} 
else if(eDesignation == "MGR") 
{ 
basicSalary= 30000; 
finalSalary = basicSalary +(0.50 * basicSalary) + (basicSalary * 0.20);
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 9 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
} 
b) Switch Selection Structure: 
The switch selection structure allows us to make decisions from number of choices. This statement sequentially tests the values of an expression against a list of integer or character constants. And when the match found, the statements associated with that constant are executed. A snippet for Switch case 
switch(adminChoice) 
{ 
case 1: 
{ 
admin_Access.addEmployee(); 
cin.get(); 
adminOptions(); 
} 
break; 
break; 
case 2: 
{ 
admin_Access.searchEmployee(); 
cin.get(); 
adminOptions(); 
} 
break; 
case 3: 
{ 
admin_Access.viewEmployee(); 
cin.get(); 
adminOptions(); 
} 
break; 
case 4: 
{ 
admin_Access.updateEmployee(); 
cin.get(); 
adminOptions(); 
} 
break; 
case 5: 
{ 
admin_Access.deleteEmployee(); 
cin.get(); 
adminOptions(); 
} 
break; 
case 6: 
{ 
admin_Access.calculateSalary(); 
cin.get(); 
adminOptions(); 
} 
break; 
case 7: 
{
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 10 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
cout<<"n"<<setw(68)<<right<<"_________________________________________________ __"; 
cout<<"nn"<<setw(55)<<right<<"Are you SURE want to LOGOUT"; 
cout<<"nn"<<setw(46)<<right<<"[Y/N] : "; 
char YN; 
cin>>YN; 
if(YN == 'Y' || YN=='y') 
loginMenu.loginPage(); 
else 
adminOptions(); 
} 
break; 
default: 
{ 
cout<<"n"<<setw(56)<<right<<"____________________________"; 
cout<<"nn"<<setw(48)<<right<<"INVALID CHOICE "<<adminChoice; 
cout<<"n"<<setw(56)<<right<<"____________________________"; 
cout<<"nn"<<setw(52)<<right<<"PRESS ENTER TO RENTER..."; 
cin.get(); 
cin.get(); 
adminOptions(); 
}
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 11 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
3.2. Implementation Codes in Terms of Object Oriented Programming Concepts 
Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Object Oriented Programming (OOP) is a programming paradigm that uses objects and can be defined as the collection of cooperating objects in which each message is capable of sending and receiving messages. 
(Margaret Rouse, 2008) 
The OOPs features that is used in the project are – 
 Abstraction 
 Encapsulation 
 Object 
 Inheritance 
 Polymorphism 
Let’s evaluate these features one by one – 
1. Abstraction 
Abstraction refers to the act of representing the essential features without including the background details or explanations. It is the concept of simplifying a real world into its essential elements. 
Justification 
The class “employeeAccess” created (code given below) in the project where only the necessary information through public access specifier are given to the outside world and rest of the things remain hidden, which is nothing but abstraction. 
 Class Definition (employeeAccess.h File) 
class employeeAccess 
{ 
public: 
virtual void mainMenu(); 
void getEmployeeDetails(); 
void addEmployee(); 
void registerEmployee(); 
void showEmployee(); 
void showEmployeeTable(); 
void viewEmployee(); 
void updateEmployee(); 
void deleteEmployee();
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 12 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
void searchEmployee(); 
void generateICNumber(); 
void assignUser(); 
void assignPass(); 
void employeeMenu(); 
void employeeOptions(); 
void viewEmployeeProfile(); 
void viewEmployeeSalary(); 
void calculateSalary(); 
protected: 
int eICNumber; 
private: 
int eICNumber; 
string eName, eGender, eQualification, eDesignation,eDepartment, eDateJoined, eNationality, eDOB, eMaritalStatus;// ePassword, eUsername; 
char eUsername[15], ePassword[15]; 
}; 
2. Encapsulation (Class) 
The wrapping up of data and operations / functions (that operate on the data) into a single unit (called class) is known as encapsulation. It is the way of combining both data and the functions that operate on the data under a single unit. Basic unit of encapsulation is a class. Characteristics of an object are represented in a class as Properties. Classes provide modularity and structure to the program. 
Justification 
The class “employeeAccess” (code given below) created in the project binds together the data and its associated functions under one unit that is implementing encapsulation. 
 Class Definition (employeeAccess.h File) 
class employeeAccess 
{ 
public: 
virtual void mainMenu(); 
void getEmployeeDetails(); 
void addEmployee(); 
void registerEmployee(); 
void showEmployee(); 
void showEmployeeTable(); 
void viewEmployee(); 
void updateEmployee(); 
void deleteEmployee(); 
void searchEmployee(); 
void generateICNumber(); 
void assignUser(); 
void assignPass();
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 13 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
void employeeMenu(); 
void employeeOptions(); 
void viewEmployeeProfile(); 
void viewEmployeeSalary(); 
void calculateSalary(); 
protected: 
int eICNumber; 
private: 
int eICNumber; 
string eName, eGender, eQualification, eDesignation,eDepartment, eDateJoined, eNationality, eDOB, eMaritalStatus;// ePassword, eUsername; 
char eUsername[15], ePassword[15]; 
}; 
 Class Definition (login.h File) 
class login 
{ 
public: 
void loginPage(); 
}; 
3. Object 
An object is the real world identifiable entity with some characteristics and behavior. It is basically an instance of a class and there can be more than one instance of a class. Each instance of a class can hold its own relevant data. Memory is allocated only when an object is created. 
In programming one object requests another object to perform an action by sending a message. The object which sends the message is called as the sender whereas the object which receives the message is known as the receiver. 
Justification 
The objects instantiated in the project is – 
employeeAccess temp; //Object Creation of employeeAccess class 
int id = 0; 
fin.open("bookfile.txt",ios::in|ios::binary); 
if(!fin) 
{ 
id = id+1; 
} 
else 
{ 
fin.read((char*)&temp, sizeof(temp)); 
while(!fin.eof())
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 14 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
{ 
id=temp.eICNumber; 
fin.read((char*)&temp, sizeof(temp)); 
} 
id++; 
} 
4. Inheritance 
Inheritance is the capability of one class of thing to inherit the capabilities or properties from another class. It is the process of forming a new class from an existing class. The existing class is called the base class or parent class or super class and the new class formed is called derived or child. And the child class can also add it additional features. 
Benefits of using inheritance – 
 It provides the reusability of the code. Once a code is written in the parent class there is no need to write the same code again in the child class. 
 Since, there is no need to write the code again and again thus helps in reducing coding efforts of the programmer and saves time. 
Types of inheritance – 
i. Based Upon Class Hierarchy 
 Single Inheritance 
 Multiple Inheritance 
 Multilevel Inheritance 
 Hybrid Inheritance 
ii. Based Upon Access Specifiers 
 Public 
 Private 
 Protected 
Justification 
Inheritance applied on code –
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 15 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
#include "employeeAccess.h" 
class adminAccess:public employeeAccess 
{ 
}; 
Here class “adminAccess” inheriting the class “employeeAccess” (given below) 
class employeeAccess 
{ 
public: 
virtual void mainMenu(); 
void getEmployeeDetails(); 
void addEmployee(); 
void registerEmployee(); 
void showEmployee(); 
void showEmployeeTable(); 
void viewEmployee(); 
void updateEmployee(); 
void deleteEmployee(); 
void searchEmployee(); 
void generateICNumber(); 
void assignUser(); 
void assignPass(); 
void employeeMenu(); 
void employeeOptions(); 
void viewEmployeeProfile(); 
void viewEmployeeSalary(); 
void calculateSalary(); 
protected: 
int eICNumber; 
private: 
int eICNumber; 
string eName, eGender, eQualification, eDesignation,eDepartment, eDateJoined, eNationality, eDOB, eMaritalStatus;// ePassword, eUsername; 
char eUsername[15], ePassword[15]; 
}; 
5. Polymorphism 
Polymorphism is the ability for a message or data to be processed in more than one form. It is a feature of OOP which allows 2 or more methods to have the same name within a class.
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 16 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
3.3. Validation Codes Applied into the Implementation Codes 
Validation is applied into the system for each entry from the user in order to avoid logical errors. Below are the justification provided for the following. 
1) Employee Name 
The name of an employee cannot be a alphanumeric values and also it cannot contain any special characters, and for that I have provided a validation. 
Justification Code: 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Employee Name:"; 
fflush(stdin); 
gets(eQualification); 
for (int i=0; i<20; i++) 
{ 
int b=(int)eName[i]; 
if (b>0&&b<48||b>122&&b<127||(b>57&&b<65)||(b>90&&b<97)) 
{ 
cout<<setw(68)<<right<<"___________________________________________________"; 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Name cannot contain SPECIAL CHARACTERS..."; 
cout<<"n"<<setw(68)<<right<<"_________________________________________________ __"; 
getName(); 
} 
} 
2) Password 
The password can be a combination of alphanumeric values and also can contain special characters, but it must be more than 5 characters long and for that I have provided the validation. 
Justification Code: 
void employeeAccess::getPassword() 
{ 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Create Password (> 5 char):"; 
gets(ePassword); 
if(strlen(ePassword) <6) 
{ 
cout<<setw(68)<<right<<"___________________________________________________"; 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Password is too short...try again"; 
cout<<"n"<<setw(68)<<right<<"____________________________________________"; 
getPassword(); 
} 
}
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 17 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
3) Employee Gender 
As an input for gender, the system accepts only two alphabetic characters M (male) or F (female), for which the validation is provided. 
Justification Code: 
void employeeAccess::getGender() 
{ 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Enter Gender [M/F]:"; 
fflush(stdin); 
gets(eGender); 
if((strcmp(eGender,"M")!=0 && strcmp(eGender,"m")!=0 && strcmp(eGender,"F")!=0 && strcmp(eGender,"f")!=0)) 
{ 
cout<<setw(68)<<right<<"___________________________________________________"; 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Invalid Gender Status...Enter [M/UF]"<<eGender; 
cout<<"n"<<setw(68)<<right<<"______________________________________________"; 
getGender(); 
} 
} 
4) Employee Designation 
Since, for the input of employee designation the codes (CEO/MD/MGR/GM/AM/SPV/LBR) are specified. So, only the specified set of codes is expected as an input and for which the validation is provided. 
Justification Code: 
void employeeAccess::getDesignation() 
{ 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Employee Designation:"; 
cout<<"n"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"(CEO/MD/MGR/GM/AM/SPV/LBR):"; 
fflush(stdin); 
gets(eDesignation); 
if((strcmp(eDesignation,"CEO")!=0) && (strcmp(eDesignation,"MD")!=0) && (strcmp(eDesignation,"MGR")!=0)&& (strcmp(eDesignation,"GM")!=0)&& (strcmp(eDesignation,"AM")!=0) && (strcmp(eDesignation,"SPV")!=0)&& (strcmp(eDesignation,"LBR")!=0)) 
{ 
cout<<setw(68)<<right<<"________________________________________________"; 
cout<<"nn"<<right<<setw(17)<<" "; 
cout<<setw(30)<<left<<"Enter Valid Designation (CEO/MD/MGR/GM/AM/SPV/LBR)"; 
cout<<"n"<<setw(68)<<right<<"___________________________________________”; 
getDesignation(); 
} 
}
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 18 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
5) Employee Department 
Since, for the input of employee department the codes (HR/MKT/PRO/QA) are specified. So, only the specified set of codes is expected as an input and for which the validation is provided. 
Justification Code: 
void employeeAccess::getMaritalStatus() 
{ 
cout<<"n"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Employee Marital Status [M/U]:"; 
fflush(stdin); 
gets(eMaritalStatus); 
if((strcmp(eMaritalStatus,"M")!=0 && strcmp(eMaritalStatus,"m")!=0 && strcmp(eMaritalStatus,"U")!=0 && strcmp(eMaritalStatus,"u")!=0)) 
{ 
cout<<setw(68)<<right<<"___________________________________________________"; 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Invalid Marital Status...Enter [M/U]"<<eMaritalStatus; 
cout<<"n"<<setw(68)<<right<<"______________________________________________"; 
getMaritalStatus(); 
} 
} 
6) Date of Joining 
Date of joining should be in the format of “DD/MM/YYYY” and it will be numeric only. And thus for taking input as “DD/MM/YYYY” validation is provided. 
7) Date of Birth 
The validation of date of birth is same as for date of joining. 
8) Marital Status 
As an input for marital status, the system accepts only two alphabetic characters M (for married) or U (unmarried), for which the validation is provided. 
Justification Code: 
void employeeAccess::getGender() 
{ 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Enter Gender [M/F]:"; 
fflush(stdin); 
cin>>eGender; 
if(eGender != 'M' || eGender != 'm' || eGender != 'F' || eGender != 'f') 
{
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 19 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
cout<<setw(68)<<right<<"___________________________________________________"; 
cout<<"nn"<<right<<setw(25)<<" "; 
cout<<setw(30)<<left<<"Invalid Gender...Enter [M/F]"<<eGender; 
cout<<"n"<<setw(68)<<right<<"____________________________________________"; 
getGender(); 
} 
} 
 
 

CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 20 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
4. UML DIAGRAMS 
4.1. Class Diagram
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 21 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
4.2. Use Case Diagram 
Administrator 
View Employee 
Profile 
Update Employee 
Details 
Login 
Employee 
Search Employee 
Delete Employee 
Profile 
<<include>> 
<<include>> 
<<include>> 
Add Employee 
Profile 
<<include>> 
Calculate Salary 
Package 
<<include>> 
Employee Management System 
<<includes>> 
By IC Number 
«extends» 
«extends» By Designation 
By Department 
«extends» 
<<includes>> 
Logout 
<<include>> 
Registration 
<<include>> 
View Profile 
<<include>> 
View Salary Package 
<<include>>
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 22 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
5. OUTPUT SCREENS 
1) Start Screen 
2) Administrator Login Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 23 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
3) Administrator Menu Screen 
4) Add Employee Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 24 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
5) Search Employee Menu Screen 
6) Search Employee By IC Number Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 25 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
7) Search Employee By Designation Screen 
8) Search Employee By Department Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 26 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
9) View All Employee Profile Screen 
10) Update Employee Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 27 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
11) Update Employee Re-Enter Details Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 28 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
12) Delete Employee Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 29 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
13) View Employee Salary Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 30 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
14) Admin Logout Screen 
15) Employee Login Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 31 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
16) Employee Menu Screen 
17) View Employee Salary Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 32 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
18) View Employee Profile Screen
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 33 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
6. CONCLUSION 
It was a great experience to design and implement the Employee Management System by using an Object Oriented Programming Language C++ and to work on its documentation. While working on this project, I have learned many things especially how to apply the concepts of OOP paradigm in modelling of real world systems. 
This assignment helped me to get the better understanding to develop and derive new class structures and organise them such that they will model real world systems within computers. It also helped me in getting in the better understanding of basic programming concepts of C++ language such as loops, control structure, arrays, file handling etc. 
In this assignment, I have used almost every concepts of C++ language, I had learned. I have also provided validations throughout the system for avoiding logical errors, used excellent logic related comments with proper indentation and the OOPs concept in an excellent manner. 
After doing this assignment, I am in position to explain object oriented programming concepts and apply them to the modelling of real world systems by utilizing its offered facilities.
CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 34 of 34 
Level 2 Asia Pacific Institute of Information Technology 2014 
7. REFERENCES 
1) Arora, S. 2010, Computer Science with C++, 6th ed., New Delhi, Dhanpat Rai & Co. 
2) Balaguruswamy E. 2006, Object Oriented Programming with C++, New Delhi, Tata McGraw Hill. 
3) Kanithkar Y.P. 2004, Let Us C++, 3rd ed., New Delhi, BPB Publication. 
4) Deitel P.J., & Dietel H.M. 2010, C++ How to Program, 7th ed., New Delhi, PHI Learning. 
5) Object Oriented programming Concepts in C++. 2014. Object Oriented programming Concepts in C++. [ONLINE] Available at: http://www.studytonight.com/cpp/cpp-and- oops-concepts.php. [Accessed 07 November 2014]. 
6) Java OOPs Concepts - Javatpoint. 2014. Java OOPs Concepts - Javatpoint. [ONLINE] Available at: http://www.javatpoint.com/java-oops-concepts. [Accessed 07 November 2014]. 
7) E Balagurusamy, A.E. 1994, Object oriented Programming with C++ Third Edition, McGraw-Hill, London

Mais conteúdo relacionado

Mais procurados

Project Proposal of an Employee Management System
Project Proposal of an Employee Management SystemProject Proposal of an Employee Management System
Project Proposal of an Employee Management SystemNurFathihaTahiatSeeu
 
Employee management system Project
Employee management system ProjectEmployee management system Project
Employee management system ProjectFaizanAnsari89
 
Employee management system
Employee management systemEmployee management system
Employee management systemDeepák Soni
 
Employee Management System
Employee Management SystemEmployee Management System
Employee Management Systemvivek shah
 
Employee work management system project using codeIgniter
Employee work management system project using codeIgniter Employee work management system project using codeIgniter
Employee work management system project using codeIgniter Shahinul Islam Sujon
 
Employee Management System Project Propsal
Employee Management System Project Propsal Employee Management System Project Propsal
Employee Management System Project Propsal Syed Junaid
 
Employee management system
Employee management systemEmployee management system
Employee management systemSreerup Karmakar
 
Placement Cell project
Placement Cell projectPlacement Cell project
Placement Cell projectManish Kumar
 
Employee Management System By AZ DATAMALL
Employee Management System By AZ DATAMALLEmployee Management System By AZ DATAMALL
Employee Management System By AZ DATAMALLrohit154
 
Training and placement
Training and placementTraining and placement
Training and placementBhavesh Parmar
 
Leave management System
Leave management SystemLeave management System
Leave management Systempratikmahorey
 
Project Report on Employee Management System.docx
Project Report on Employee Management System.docxProject Report on Employee Management System.docx
Project Report on Employee Management System.docxDhineshkumarPrakasam
 
Employee Leave Management System
Employee Leave Management SystemEmployee Leave Management System
Employee Leave Management SystemMd. Mahbub Alam
 
Payroll Management System Complete Report
Payroll Management System Complete ReportPayroll Management System Complete Report
Payroll Management System Complete ReportSavio Aberneithie
 
Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS) Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS) Abhilasha Lahigude
 
Hostel management system srs
Hostel management system srsHostel management system srs
Hostel management system srshira akram
 
Phone book with project report for BCA,MCA
Phone book with project report for BCA,MCAPhone book with project report for BCA,MCA
Phone book with project report for BCA,MCASp Gurjar
 
Payroll System Specification
Payroll System SpecificationPayroll System Specification
Payroll System SpecificationMichael Hather
 

Mais procurados (20)

Employee Management System
Employee Management SystemEmployee Management System
Employee Management System
 
Project Proposal of an Employee Management System
Project Proposal of an Employee Management SystemProject Proposal of an Employee Management System
Project Proposal of an Employee Management System
 
Employee management system Project
Employee management system ProjectEmployee management system Project
Employee management system Project
 
Employee management system
Employee management systemEmployee management system
Employee management system
 
Employee Management System
Employee Management SystemEmployee Management System
Employee Management System
 
Employee work management system project using codeIgniter
Employee work management system project using codeIgniter Employee work management system project using codeIgniter
Employee work management system project using codeIgniter
 
Employee Management System Project Propsal
Employee Management System Project Propsal Employee Management System Project Propsal
Employee Management System Project Propsal
 
Employee management system
Employee management systemEmployee management system
Employee management system
 
Placement Cell project
Placement Cell projectPlacement Cell project
Placement Cell project
 
Employee Management System By AZ DATAMALL
Employee Management System By AZ DATAMALLEmployee Management System By AZ DATAMALL
Employee Management System By AZ DATAMALL
 
Address book
Address bookAddress book
Address book
 
Training and placement
Training and placementTraining and placement
Training and placement
 
Leave management System
Leave management SystemLeave management System
Leave management System
 
Project Report on Employee Management System.docx
Project Report on Employee Management System.docxProject Report on Employee Management System.docx
Project Report on Employee Management System.docx
 
Employee Leave Management System
Employee Leave Management SystemEmployee Leave Management System
Employee Leave Management System
 
Payroll Management System Complete Report
Payroll Management System Complete ReportPayroll Management System Complete Report
Payroll Management System Complete Report
 
Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS) Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS)
 
Hostel management system srs
Hostel management system srsHostel management system srs
Hostel management system srs
 
Phone book with project report for BCA,MCA
Phone book with project report for BCA,MCAPhone book with project report for BCA,MCA
Phone book with project report for BCA,MCA
 
Payroll System Specification
Payroll System SpecificationPayroll System Specification
Payroll System Specification
 

Destaque

Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Mohammad Karim Shahbaz
 
Employee Profile Management System
Employee Profile Management SystemEmployee Profile Management System
Employee Profile Management Systemncct
 
3263270 human-resource-management-systems-hrms
3263270 human-resource-management-systems-hrms3263270 human-resource-management-systems-hrms
3263270 human-resource-management-systems-hrmschetanmbhimewal
 
Payroll Management System SRS
Payroll Management System SRSPayroll Management System SRS
Payroll Management System SRSShubham Modi
 
Final major project presentation on (10 april2016) aits haldwani
Final major project  presentation on (10 april2016) aits haldwaniFinal major project  presentation on (10 april2016) aits haldwani
Final major project presentation on (10 april2016) aits haldwaniVijay Singh Khatri
 
Human Resource Management System
Human Resource Management SystemHuman Resource Management System
Human Resource Management SystemAdam Waheed
 
Dfd and flowchart
Dfd and flowchartDfd and flowchart
Dfd and flowchartMir Majid
 
Task management system
Task management systemTask management system
Task management systemJayy Shah
 
Payroll Management System
Payroll Management SystemPayroll Management System
Payroll Management SystemDheeraj Jha
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMNitish Xavier Tirkey
 
Project report on ONLINE REAL ESTATE BUSINESS
Project report on ONLINE REAL ESTATE BUSINESSProject report on ONLINE REAL ESTATE BUSINESS
Project report on ONLINE REAL ESTATE BUSINESSDivyesh Shah
 
Human Resource Management System (HRMS)
Human Resource Management System (HRMS)Human Resource Management System (HRMS)
Human Resource Management System (HRMS)Samaresh Debbarma
 
Effective Meetings (Assignment)
Effective Meetings (Assignment)Effective Meetings (Assignment)
Effective Meetings (Assignment)umailaila
 
Human Resource Management System, HRMS
Human Resource Management System, HRMSHuman Resource Management System, HRMS
Human Resource Management System, HRMSMyo Thein
 
Time And Task Management
Time And Task ManagementTime And Task Management
Time And Task ManagementDanny Smith
 
Payroll and attendance system
Payroll and attendance system Payroll and attendance system
Payroll and attendance system Moses Nkrumah
 

Destaque (20)

Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
 
Employee Profile Management System
Employee Profile Management SystemEmployee Profile Management System
Employee Profile Management System
 
Employee Time and Task Tracking System
Employee Time and Task Tracking SystemEmployee Time and Task Tracking System
Employee Time and Task Tracking System
 
HR management system
HR management systemHR management system
HR management system
 
3263270 human-resource-management-systems-hrms
3263270 human-resource-management-systems-hrms3263270 human-resource-management-systems-hrms
3263270 human-resource-management-systems-hrms
 
Payroll Management System SRS
Payroll Management System SRSPayroll Management System SRS
Payroll Management System SRS
 
Final major project presentation on (10 april2016) aits haldwani
Final major project  presentation on (10 april2016) aits haldwaniFinal major project  presentation on (10 april2016) aits haldwani
Final major project presentation on (10 april2016) aits haldwani
 
Human Resource Management System
Human Resource Management SystemHuman Resource Management System
Human Resource Management System
 
A minor project
A minor projectA minor project
A minor project
 
Dfd and flowchart
Dfd and flowchartDfd and flowchart
Dfd and flowchart
 
Task management system
Task management systemTask management system
Task management system
 
Payroll Management System
Payroll Management SystemPayroll Management System
Payroll Management System
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEM
 
Project report on ONLINE REAL ESTATE BUSINESS
Project report on ONLINE REAL ESTATE BUSINESSProject report on ONLINE REAL ESTATE BUSINESS
Project report on ONLINE REAL ESTATE BUSINESS
 
Human Resource Management System (HRMS)
Human Resource Management System (HRMS)Human Resource Management System (HRMS)
Human Resource Management System (HRMS)
 
Employee management system uml
Employee management system umlEmployee management system uml
Employee management system uml
 
Effective Meetings (Assignment)
Effective Meetings (Assignment)Effective Meetings (Assignment)
Effective Meetings (Assignment)
 
Human Resource Management System, HRMS
Human Resource Management System, HRMSHuman Resource Management System, HRMS
Human Resource Management System, HRMS
 
Time And Task Management
Time And Task ManagementTime And Task Management
Time And Task Management
 
Payroll and attendance system
Payroll and attendance system Payroll and attendance system
Payroll and attendance system
 

Semelhante a Employee Management System in C++

Table of contents
Table of contentsTable of contents
Table of contentskamal kumar
 
IRJET- Office Automation System
IRJET- Office Automation SystemIRJET- Office Automation System
IRJET- Office Automation SystemIRJET Journal
 
IRJET - Scrutinize the Utility of Preserved Data with Privacy
IRJET -  	  Scrutinize the Utility of Preserved Data with PrivacyIRJET -  	  Scrutinize the Utility of Preserved Data with Privacy
IRJET - Scrutinize the Utility of Preserved Data with PrivacyIRJET Journal
 
Attendance Management System
Attendance Management SystemAttendance Management System
Attendance Management SystemArhind Gautam
 
373512722-Employee-Leave-Management-System.docx
373512722-Employee-Leave-Management-System.docx373512722-Employee-Leave-Management-System.docx
373512722-Employee-Leave-Management-System.docxsanthoshyadav23
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_designTushar Rajput
 
Amol Chillarge Asp.net C# developer and Tester
Amol Chillarge Asp.net C# developer and TesterAmol Chillarge Asp.net C# developer and Tester
Amol Chillarge Asp.net C# developer and TesterAmol Chillarge
 
NEC Employee Accreditation Activity ProjectNetwork Enterpriser.docx
NEC Employee Accreditation Activity ProjectNetwork Enterpriser.docxNEC Employee Accreditation Activity ProjectNetwork Enterpriser.docx
NEC Employee Accreditation Activity ProjectNetwork Enterpriser.docxrosemarybdodson23141
 
Online Voting System Project management system.doc
Online Voting System Project management system.docOnline Voting System Project management system.doc
Online Voting System Project management system.docKamal Acharya
 
Car Showroom management System in c++
Car Showroom management System in c++Car Showroom management System in c++
Car Showroom management System in c++PUBLIVE
 
School management System
School management SystemSchool management System
School management SystemHATIM Bhagat
 
IRJET- Efficient Student Faculty Management System
IRJET- Efficient Student Faculty Management SystemIRJET- Efficient Student Faculty Management System
IRJET- Efficient Student Faculty Management SystemIRJET Journal
 
Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02Shuchi Singla
 
Onlineshoppingonline shopping
Onlineshoppingonline shoppingOnlineshoppingonline shopping
Onlineshoppingonline shoppingHardik Padhy
 
Event Management System Document
Event Management System Document Event Management System Document
Event Management System Document LJ PROJECTS
 

Semelhante a Employee Management System in C++ (20)

Ems
EmsEms
Ems
 
Table of contents
Table of contentsTable of contents
Table of contents
 
c++
c++c++
c++
 
IRJET- Office Automation System
IRJET- Office Automation SystemIRJET- Office Automation System
IRJET- Office Automation System
 
IRJET - Scrutinize the Utility of Preserved Data with Privacy
IRJET -  	  Scrutinize the Utility of Preserved Data with PrivacyIRJET -  	  Scrutinize the Utility of Preserved Data with Privacy
IRJET - Scrutinize the Utility of Preserved Data with Privacy
 
Attendance Management System
Attendance Management SystemAttendance Management System
Attendance Management System
 
373512722-Employee-Leave-Management-System.docx
373512722-Employee-Leave-Management-System.docx373512722-Employee-Leave-Management-System.docx
373512722-Employee-Leave-Management-System.docx
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_design
 
Amol Chillarge Asp.net C# developer and Tester
Amol Chillarge Asp.net C# developer and TesterAmol Chillarge Asp.net C# developer and Tester
Amol Chillarge Asp.net C# developer and Tester
 
NEC Employee Accreditation Activity ProjectNetwork Enterpriser.docx
NEC Employee Accreditation Activity ProjectNetwork Enterpriser.docxNEC Employee Accreditation Activity ProjectNetwork Enterpriser.docx
NEC Employee Accreditation Activity ProjectNetwork Enterpriser.docx
 
Online Voting System Project management system.doc
Online Voting System Project management system.docOnline Voting System Project management system.doc
Online Voting System Project management system.doc
 
Sample report
Sample reportSample report
Sample report
 
Car Showroom management System in c++
Car Showroom management System in c++Car Showroom management System in c++
Car Showroom management System in c++
 
School management System
School management SystemSchool management System
School management System
 
0.3 aim phases_and_documentations
0.3 aim phases_and_documentations0.3 aim phases_and_documentations
0.3 aim phases_and_documentations
 
IRJET- Efficient Student Faculty Management System
IRJET- Efficient Student Faculty Management SystemIRJET- Efficient Student Faculty Management System
IRJET- Efficient Student Faculty Management System
 
Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02Onlineshopping 121105040955-phpapp02
Onlineshopping 121105040955-phpapp02
 
Onlineshoppingonline shopping
Onlineshoppingonline shoppingOnlineshoppingonline shopping
Onlineshoppingonline shopping
 
Learning%20%20 port
Learning%20%20 portLearning%20%20 port
Learning%20%20 port
 
Event Management System Document
Event Management System Document Event Management System Document
Event Management System Document
 

Último

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 

Último (20)

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 

Employee Management System in C++

  • 1. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 1 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 TABLE OF CONTENTS S. No. Page No. Acknowledgement ...................................................................................................................... 2 1. Introduction ............................................................................................................................ 3 2. Project Description................................................................................................................. 4 2.1. Login Module .................................................................................................................. 4 2.2. Administration Module ................................................................................................... 4 2.3. Employee Module ........................................................................................................... 4 2.4. Identity Card (IC) Number Generation Module .............................................................. 4 2.5. Record Searching Module ............................................................................................... 5 3. Description and Justification .................................................................................................. 6 3.1. Design of the Implemented Code .................................................................................... 6 3.2. Implementation Code in terms of OOP Concepts ......................................................... 11 3.3.Validation Code Applied in the Implementation Code .................................................. 16 4. UML Diagrams .................................................................................................................... 20 4.1. Class Diagram ............................................................................................................... 20 4.2. Use Case Diagram ......................................................................................................... 21 5. Output Screens ..................................................................................................................... 22 6. Conclusion ........................................................................................................................... 33 7. References ............................................................................................................................ 34
  • 2. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 2 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 ACKNOWLEDGEMENT To acknowledge and thank every individual who directly or indirectly contributed to this venture personally, it would require an inordinate amount of time. I am deeply indebted to many individual, whose cooperation made this job easier. I am thankful and express my sincere gratitude to APIIT SD INDIA, Panipat for providing me an opportunity for fulfilling my most cherished desire. I avail this opportunity to express my gratitude to my friends and my parents for their support and encouragement throughout project. I feel it is as a great pleasure to express my deep sense of profound thank to Module Lecturer Mrs. Pradeep Kumar, who guided me at every step and also encouraged to carry out the project. Lastly, I would like to thank all those whose names may not have appeared here but whose contribution has not gone unnoticed. Jayant Kumar Gope Intake No.: PT1282240
  • 3. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 3 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 1. INTRODUCTION The objective of this assignment is to develop a Win32 console application for an Employee Management System, where it is expected to enter, search, edit and view personnel information of the Employee in an Organization based on different access priority and calculate their salary package. We are required design the application by assuming that, this system will be installed only in one terminal and used by all types of users, specially the Employee and the administrator of this application. The main purpose of this application is to store and edit the complete personal record of each Employee along with evaluation of salary (annually) in an organization. And all information that is to be added and edited must be handled via text (.txt) or data (.dat) file, so that the information can be uploaded back into the system once activated or saved when the system is exited. We are also required to incorporate the Validation throughout the application for each entry, from the user in order to avoid logical errors. We are supposed to describe, justify and implement an object oriented system by the application, Introduce current technical issues in the field of object oriented programming (OOP). Thus, predominantly our implementation code is expected to highlight the use of object oriented programming principles (OOPS) such as:  Class  Abstraction  Inheritance  Polymorphism
  • 4. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 4 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 2. PROJECT DESCRIPTION The project is evaluated deeply and it is discovered that, this project contains certain modules that needs to be incorporated in the system design. So, for getting the better understanding of the project, these modules are described below – 2.1. Login Module It is one of the most important modules of the Employee Management System. Each Employee of the system has to be assigned its own username and password. And the assigning job is to be performed by the administrator. The login module chiefly contains:  Administrator Login  Employee Login 2.2. Administrator Module The administrator of the application has to be provided the highest access priority which enables him/her to perform all the functionalities that exist in the application. In addition to that, the administrator is able to register Employee. The administrator is allowed to:  Register Employee as users of the system.  Add, search and edit personal information of Employee.  Delete record of any Employee.  Calculate salary package of Employees. 2.3. Employee Module The Employee in this application has the lowest access priority that only enables him/her to only view the personal information and the annual salary. 2.4. Identification Card (IC) Number Generation Module Each employee in the application has to be assigned with its unique Identification Card (IC) Number by which the employee can be identified uniquely for the operations and this is automatically generated by the system.
  • 5. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 5 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 2.5. Record Searching Module The searching of any record in the system must be done by using the following categories:  IC Number  Designation  Department
  • 6. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 6 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 3. DESCRIPTION AND JUSTIFICATION 3.1. Design of The Implementation Codes  Description In this Employee Management System, it has been already stated that, administrator has the highest access priority that means he can perform each and every functionality specified in the system. The functionalities he can perform includes add employee, register employee so that employee can access the system, search, update, delete the information of employees and can calculate salary of the employees. And the lowest access priority is given to the employee who can only view his own profile and annual salary.  Justification As the access priorities of different users is being discussed- a) Administrator given the highest priority in System Justification - As we know that administrator of any organization has got all the privileges and rights, so we also followed the same criteria in the system and provided the administrator the highest priority amongst all users. b) Employees given the Least Priority Justification – Generally, the employee of any organization has not to do a lot with the management system, as it is made for maintaining the organization data. So, employee in the system is given the less priority than admin. c) Use of Functions Justification – Large programs are difficult to manage as a single list of instructions. Thus, large programs are divided into smaller parts known as functions. A function is a group of statements that together perform a task. The functions can be invoked (Called) from other parts of the program. The most important reason that we have used functions in a program because they make the program handling easier. void employeeAccess::viewEmployee() // Function Definition { system("cls");
  • 7. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 7 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 cout<<"n"<<setw(54)<<right<<"---------------------------"; cout<<"n"<<setw(53)<<right<<" VIEW EMPLOYEE PROFILE "; cout<<"n"<<setw(54)<<right<<"---------------------------"; ifstream fin; fin.open("employeeDetails.txt",ios::in|ios::binary); if(!fin) cout<<"File not found"; else { showHeading(); //function Call fin.read((char*)this,sizeof(*this)); while(!fin.eof()) { showEmployeeTable(); //function callS fin.read((char*)this,sizeof(*this)); } } fin.close(); } d) Use of File Handling Since, we were required to store all the information that is added and edited in the text file, so that the information can be uploaded back into the system once activated or saved when the system is exited. And through file handling, operations like create, modify, delete etc can be performed thus file handling is used. Below given snippet is of adding an employee in the project - void employeeAccess::addEmployee() { system("cls"); cout<<"n"<<setw(54)<<right<<"--------------------------"; cout<<"n"<<setw(53)<<right<<" ADD EMPLOYEE PROFILE "; cout<<"n"<<setw(54)<<right<<"--------------------------"; ifstream fin; employeeAccess temp; int id = 0; fin.open("employeeDetails.txt",ios::in|ios::binary); //opening file if(!fin) { id = id+1; } else { fin.read((char*)&temp, sizeof(temp)); //reading from file while(!fin.eof()) { id=temp.eICNumber; fin.read((char*)&temp, sizeof(temp)); //reading from file } id++; } eICNumber = id; getEmployeeDetails();
  • 8. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 8 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 ofstream fout; fout.open("employeeDetails.txt",ios::out|ios::app|ios::binary); if(!fout) cout<<"File can not open"; else fout.write((char*)this, sizeof(*this)); //writing to the file cout<<"n"<<setw(68)<<right<<"__________________________________________ _________"; cout<<"nn"<<setw(50)<<right<<" EMPLOYEE ADDED "; fout.close(); cin.get(); cin.get(); adminOptions(); } e) Use of Control Structures Control structures controls the flow of the program. Basically there are three types of control structures – i) Sequential : In sequential structure, the programs are executed sequentially in which they are written. sequential structure specifies the normal flow of the program. ii) Selection : The selection structure means the execution of statements depends upon the condition test. If the condition comes out to be true then, a set of statements will be executed otherwise another set of statements will be executed. C provides three types of Selection Structures. a) if Statement : This (if) statement performs the actions only, when the condition comes out to be true and skips the statements when condition becomes false. Below is the code given for calculating the salary - double basicSalary, finalSalary; if(eDesignation == "CEO") { basicSalary= 50000; finalSalary = basicSalary + (0.70 * basicSalary) + (basicSalary * 0.20); } else if(eDesignation == "MD") { basicSalary= 35000; finalSalary = basicSalary + (0.50 * basicSalary) + (basicSalary * 0.20); } else if(eDesignation == "MGR") { basicSalary= 30000; finalSalary = basicSalary +(0.50 * basicSalary) + (basicSalary * 0.20);
  • 9. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 9 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 } b) Switch Selection Structure: The switch selection structure allows us to make decisions from number of choices. This statement sequentially tests the values of an expression against a list of integer or character constants. And when the match found, the statements associated with that constant are executed. A snippet for Switch case switch(adminChoice) { case 1: { admin_Access.addEmployee(); cin.get(); adminOptions(); } break; break; case 2: { admin_Access.searchEmployee(); cin.get(); adminOptions(); } break; case 3: { admin_Access.viewEmployee(); cin.get(); adminOptions(); } break; case 4: { admin_Access.updateEmployee(); cin.get(); adminOptions(); } break; case 5: { admin_Access.deleteEmployee(); cin.get(); adminOptions(); } break; case 6: { admin_Access.calculateSalary(); cin.get(); adminOptions(); } break; case 7: {
  • 10. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 10 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 cout<<"n"<<setw(68)<<right<<"_________________________________________________ __"; cout<<"nn"<<setw(55)<<right<<"Are you SURE want to LOGOUT"; cout<<"nn"<<setw(46)<<right<<"[Y/N] : "; char YN; cin>>YN; if(YN == 'Y' || YN=='y') loginMenu.loginPage(); else adminOptions(); } break; default: { cout<<"n"<<setw(56)<<right<<"____________________________"; cout<<"nn"<<setw(48)<<right<<"INVALID CHOICE "<<adminChoice; cout<<"n"<<setw(56)<<right<<"____________________________"; cout<<"nn"<<setw(52)<<right<<"PRESS ENTER TO RENTER..."; cin.get(); cin.get(); adminOptions(); }
  • 11. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 11 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 3.2. Implementation Codes in Terms of Object Oriented Programming Concepts Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Object Oriented Programming (OOP) is a programming paradigm that uses objects and can be defined as the collection of cooperating objects in which each message is capable of sending and receiving messages. (Margaret Rouse, 2008) The OOPs features that is used in the project are –  Abstraction  Encapsulation  Object  Inheritance  Polymorphism Let’s evaluate these features one by one – 1. Abstraction Abstraction refers to the act of representing the essential features without including the background details or explanations. It is the concept of simplifying a real world into its essential elements. Justification The class “employeeAccess” created (code given below) in the project where only the necessary information through public access specifier are given to the outside world and rest of the things remain hidden, which is nothing but abstraction.  Class Definition (employeeAccess.h File) class employeeAccess { public: virtual void mainMenu(); void getEmployeeDetails(); void addEmployee(); void registerEmployee(); void showEmployee(); void showEmployeeTable(); void viewEmployee(); void updateEmployee(); void deleteEmployee();
  • 12. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 12 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 void searchEmployee(); void generateICNumber(); void assignUser(); void assignPass(); void employeeMenu(); void employeeOptions(); void viewEmployeeProfile(); void viewEmployeeSalary(); void calculateSalary(); protected: int eICNumber; private: int eICNumber; string eName, eGender, eQualification, eDesignation,eDepartment, eDateJoined, eNationality, eDOB, eMaritalStatus;// ePassword, eUsername; char eUsername[15], ePassword[15]; }; 2. Encapsulation (Class) The wrapping up of data and operations / functions (that operate on the data) into a single unit (called class) is known as encapsulation. It is the way of combining both data and the functions that operate on the data under a single unit. Basic unit of encapsulation is a class. Characteristics of an object are represented in a class as Properties. Classes provide modularity and structure to the program. Justification The class “employeeAccess” (code given below) created in the project binds together the data and its associated functions under one unit that is implementing encapsulation.  Class Definition (employeeAccess.h File) class employeeAccess { public: virtual void mainMenu(); void getEmployeeDetails(); void addEmployee(); void registerEmployee(); void showEmployee(); void showEmployeeTable(); void viewEmployee(); void updateEmployee(); void deleteEmployee(); void searchEmployee(); void generateICNumber(); void assignUser(); void assignPass();
  • 13. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 13 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 void employeeMenu(); void employeeOptions(); void viewEmployeeProfile(); void viewEmployeeSalary(); void calculateSalary(); protected: int eICNumber; private: int eICNumber; string eName, eGender, eQualification, eDesignation,eDepartment, eDateJoined, eNationality, eDOB, eMaritalStatus;// ePassword, eUsername; char eUsername[15], ePassword[15]; };  Class Definition (login.h File) class login { public: void loginPage(); }; 3. Object An object is the real world identifiable entity with some characteristics and behavior. It is basically an instance of a class and there can be more than one instance of a class. Each instance of a class can hold its own relevant data. Memory is allocated only when an object is created. In programming one object requests another object to perform an action by sending a message. The object which sends the message is called as the sender whereas the object which receives the message is known as the receiver. Justification The objects instantiated in the project is – employeeAccess temp; //Object Creation of employeeAccess class int id = 0; fin.open("bookfile.txt",ios::in|ios::binary); if(!fin) { id = id+1; } else { fin.read((char*)&temp, sizeof(temp)); while(!fin.eof())
  • 14. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 14 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 { id=temp.eICNumber; fin.read((char*)&temp, sizeof(temp)); } id++; } 4. Inheritance Inheritance is the capability of one class of thing to inherit the capabilities or properties from another class. It is the process of forming a new class from an existing class. The existing class is called the base class or parent class or super class and the new class formed is called derived or child. And the child class can also add it additional features. Benefits of using inheritance –  It provides the reusability of the code. Once a code is written in the parent class there is no need to write the same code again in the child class.  Since, there is no need to write the code again and again thus helps in reducing coding efforts of the programmer and saves time. Types of inheritance – i. Based Upon Class Hierarchy  Single Inheritance  Multiple Inheritance  Multilevel Inheritance  Hybrid Inheritance ii. Based Upon Access Specifiers  Public  Private  Protected Justification Inheritance applied on code –
  • 15. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 15 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 #include "employeeAccess.h" class adminAccess:public employeeAccess { }; Here class “adminAccess” inheriting the class “employeeAccess” (given below) class employeeAccess { public: virtual void mainMenu(); void getEmployeeDetails(); void addEmployee(); void registerEmployee(); void showEmployee(); void showEmployeeTable(); void viewEmployee(); void updateEmployee(); void deleteEmployee(); void searchEmployee(); void generateICNumber(); void assignUser(); void assignPass(); void employeeMenu(); void employeeOptions(); void viewEmployeeProfile(); void viewEmployeeSalary(); void calculateSalary(); protected: int eICNumber; private: int eICNumber; string eName, eGender, eQualification, eDesignation,eDepartment, eDateJoined, eNationality, eDOB, eMaritalStatus;// ePassword, eUsername; char eUsername[15], ePassword[15]; }; 5. Polymorphism Polymorphism is the ability for a message or data to be processed in more than one form. It is a feature of OOP which allows 2 or more methods to have the same name within a class.
  • 16. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 16 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 3.3. Validation Codes Applied into the Implementation Codes Validation is applied into the system for each entry from the user in order to avoid logical errors. Below are the justification provided for the following. 1) Employee Name The name of an employee cannot be a alphanumeric values and also it cannot contain any special characters, and for that I have provided a validation. Justification Code: cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Employee Name:"; fflush(stdin); gets(eQualification); for (int i=0; i<20; i++) { int b=(int)eName[i]; if (b>0&&b<48||b>122&&b<127||(b>57&&b<65)||(b>90&&b<97)) { cout<<setw(68)<<right<<"___________________________________________________"; cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Name cannot contain SPECIAL CHARACTERS..."; cout<<"n"<<setw(68)<<right<<"_________________________________________________ __"; getName(); } } 2) Password The password can be a combination of alphanumeric values and also can contain special characters, but it must be more than 5 characters long and for that I have provided the validation. Justification Code: void employeeAccess::getPassword() { cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Create Password (> 5 char):"; gets(ePassword); if(strlen(ePassword) <6) { cout<<setw(68)<<right<<"___________________________________________________"; cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Password is too short...try again"; cout<<"n"<<setw(68)<<right<<"____________________________________________"; getPassword(); } }
  • 17. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 17 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 3) Employee Gender As an input for gender, the system accepts only two alphabetic characters M (male) or F (female), for which the validation is provided. Justification Code: void employeeAccess::getGender() { cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Enter Gender [M/F]:"; fflush(stdin); gets(eGender); if((strcmp(eGender,"M")!=0 && strcmp(eGender,"m")!=0 && strcmp(eGender,"F")!=0 && strcmp(eGender,"f")!=0)) { cout<<setw(68)<<right<<"___________________________________________________"; cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Invalid Gender Status...Enter [M/UF]"<<eGender; cout<<"n"<<setw(68)<<right<<"______________________________________________"; getGender(); } } 4) Employee Designation Since, for the input of employee designation the codes (CEO/MD/MGR/GM/AM/SPV/LBR) are specified. So, only the specified set of codes is expected as an input and for which the validation is provided. Justification Code: void employeeAccess::getDesignation() { cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Employee Designation:"; cout<<"n"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"(CEO/MD/MGR/GM/AM/SPV/LBR):"; fflush(stdin); gets(eDesignation); if((strcmp(eDesignation,"CEO")!=0) && (strcmp(eDesignation,"MD")!=0) && (strcmp(eDesignation,"MGR")!=0)&& (strcmp(eDesignation,"GM")!=0)&& (strcmp(eDesignation,"AM")!=0) && (strcmp(eDesignation,"SPV")!=0)&& (strcmp(eDesignation,"LBR")!=0)) { cout<<setw(68)<<right<<"________________________________________________"; cout<<"nn"<<right<<setw(17)<<" "; cout<<setw(30)<<left<<"Enter Valid Designation (CEO/MD/MGR/GM/AM/SPV/LBR)"; cout<<"n"<<setw(68)<<right<<"___________________________________________”; getDesignation(); } }
  • 18. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 18 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 5) Employee Department Since, for the input of employee department the codes (HR/MKT/PRO/QA) are specified. So, only the specified set of codes is expected as an input and for which the validation is provided. Justification Code: void employeeAccess::getMaritalStatus() { cout<<"n"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Employee Marital Status [M/U]:"; fflush(stdin); gets(eMaritalStatus); if((strcmp(eMaritalStatus,"M")!=0 && strcmp(eMaritalStatus,"m")!=0 && strcmp(eMaritalStatus,"U")!=0 && strcmp(eMaritalStatus,"u")!=0)) { cout<<setw(68)<<right<<"___________________________________________________"; cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Invalid Marital Status...Enter [M/U]"<<eMaritalStatus; cout<<"n"<<setw(68)<<right<<"______________________________________________"; getMaritalStatus(); } } 6) Date of Joining Date of joining should be in the format of “DD/MM/YYYY” and it will be numeric only. And thus for taking input as “DD/MM/YYYY” validation is provided. 7) Date of Birth The validation of date of birth is same as for date of joining. 8) Marital Status As an input for marital status, the system accepts only two alphabetic characters M (for married) or U (unmarried), for which the validation is provided. Justification Code: void employeeAccess::getGender() { cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Enter Gender [M/F]:"; fflush(stdin); cin>>eGender; if(eGender != 'M' || eGender != 'm' || eGender != 'F' || eGender != 'f') {
  • 19. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 19 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 cout<<setw(68)<<right<<"___________________________________________________"; cout<<"nn"<<right<<setw(25)<<" "; cout<<setw(30)<<left<<"Invalid Gender...Enter [M/F]"<<eGender; cout<<"n"<<setw(68)<<right<<"____________________________________________"; getGender(); } }   
  • 20. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 20 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 4. UML DIAGRAMS 4.1. Class Diagram
  • 21. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 21 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 4.2. Use Case Diagram Administrator View Employee Profile Update Employee Details Login Employee Search Employee Delete Employee Profile <<include>> <<include>> <<include>> Add Employee Profile <<include>> Calculate Salary Package <<include>> Employee Management System <<includes>> By IC Number «extends» «extends» By Designation By Department «extends» <<includes>> Logout <<include>> Registration <<include>> View Profile <<include>> View Salary Package <<include>>
  • 22. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 22 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 5. OUTPUT SCREENS 1) Start Screen 2) Administrator Login Screen
  • 23. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 23 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 3) Administrator Menu Screen 4) Add Employee Screen
  • 24. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 24 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 5) Search Employee Menu Screen 6) Search Employee By IC Number Screen
  • 25. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 25 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 7) Search Employee By Designation Screen 8) Search Employee By Department Screen
  • 26. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 26 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 9) View All Employee Profile Screen 10) Update Employee Screen
  • 27. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 27 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 11) Update Employee Re-Enter Details Screen
  • 28. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 28 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 12) Delete Employee Screen
  • 29. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 29 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 13) View Employee Salary Screen
  • 30. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 30 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 14) Admin Logout Screen 15) Employee Login Screen
  • 31. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 31 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 16) Employee Menu Screen 17) View Employee Salary Screen
  • 32. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 32 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 18) View Employee Profile Screen
  • 33. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 33 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 6. CONCLUSION It was a great experience to design and implement the Employee Management System by using an Object Oriented Programming Language C++ and to work on its documentation. While working on this project, I have learned many things especially how to apply the concepts of OOP paradigm in modelling of real world systems. This assignment helped me to get the better understanding to develop and derive new class structures and organise them such that they will model real world systems within computers. It also helped me in getting in the better understanding of basic programming concepts of C++ language such as loops, control structure, arrays, file handling etc. In this assignment, I have used almost every concepts of C++ language, I had learned. I have also provided validations throughout the system for avoiding logical errors, used excellent logic related comments with proper indentation and the OOPs concept in an excellent manner. After doing this assignment, I am in position to explain object oriented programming concepts and apply them to the modelling of real world systems by utilizing its offered facilities.
  • 34. CE00314-2-Further Programming Concepts in C++ Individual Assignment Page 34 of 34 Level 2 Asia Pacific Institute of Information Technology 2014 7. REFERENCES 1) Arora, S. 2010, Computer Science with C++, 6th ed., New Delhi, Dhanpat Rai & Co. 2) Balaguruswamy E. 2006, Object Oriented Programming with C++, New Delhi, Tata McGraw Hill. 3) Kanithkar Y.P. 2004, Let Us C++, 3rd ed., New Delhi, BPB Publication. 4) Deitel P.J., & Dietel H.M. 2010, C++ How to Program, 7th ed., New Delhi, PHI Learning. 5) Object Oriented programming Concepts in C++. 2014. Object Oriented programming Concepts in C++. [ONLINE] Available at: http://www.studytonight.com/cpp/cpp-and- oops-concepts.php. [Accessed 07 November 2014]. 6) Java OOPs Concepts - Javatpoint. 2014. Java OOPs Concepts - Javatpoint. [ONLINE] Available at: http://www.javatpoint.com/java-oops-concepts. [Accessed 07 November 2014]. 7) E Balagurusamy, A.E. 1994, Object oriented Programming with C++ Third Edition, McGraw-Hill, London