Jinendra Major Project
Jinendra Major Project
COLLEGE
SHAJAPUR , (M.P.)
(2021 – 2022)
CERTIFICATE
Date:
Date: ………………..
Signature of Student
Signature of Student
INDEX
1. INTRODUCTION 1-7
1.1 BACKGROUND 4
1.2 OBJECTIVES 5
1.3 PURPOSE AND SCOPE 7
6. TESTING 95-97
6.1 TESTING OBJECTIVES 96
6.2 TESTING METHODOLOGIES 96
6.3 QUALITY ATTRIBUTES 97
7. IMPLEMENTATION 98-109
7.1 CHARACTERISTICS OF LANGUAGE USED 99
7.2 VALIDATION CHECKS 108
7.3 INSTALLATION 109
8. CONCLUSION 110-118
8.1 LIMITATION OF PROJECT 112
8.2 DIFFICULTIES ENCOUNTERED 114
8.3 FUTURE ENHANCEMENT 116
(1)
INTRODUCTION
Payroll is the only one software processing with good and wide-industry range
of clients. It offers very high flexibility in defining various allowances,
deductions; leave rules etc. for the employees and all formula for P.F etc. are
definable and changeable for user’s end.Payroll application has been designed
for the purpose of the maintaining details of various allowances and deductions
that need to be given to the employee of the organization. Also, it generates the
salary sheet of employee of organization that assists the accounts department in
many ways.
(2)
The electronic and computerized payroll system will no only offer exact
calculations and accurate data of designated employees but it will also
implement security measures and confidentiality of the files and accordingly
arrange documents provided by an ingenious and quick-witted database that will
indeed construct a paperless environment. With the aspiring technologies been
thought up today, this minimize the burden and heavy loads of labor of the
employees designated in the human resource management office of a certain
company or institution As businesses grow, employee management becomes
complex. What you need is a Payroll Management System that is easy to use,
employee-centric and HR effective. Whatever stage of business cycle you are
in, payroll services is sure to benefit you. HR outsourcing companies offers a
new age Payroll Management System to manage new-age workforce.
The Payroll Management System allows you to take your human resources
management to a higher level. Even the top payroll providers in Bangladesh
understand the importance of error free payroll management activities. With
extensive range of services, your organization can enjoy 6 a payroll process
which is timely and accurate. Payroll software often requires very little input
from the employer. The employer is required to input employee wage
information and hours— then the software uses the information to perform
calculations and deduct withholdings automatically. Most payroll software is
automatically updated whenever a tax law changes and will remind employers
when to file various tax forms. For small businesses, payroll system software
can mitigate errors in the payroll process and reduce the amount of effort
involved in calculating employee hours, wages, and tax withholdings.
Payroll software is easy to use and often times very affordable for small
businesses. In some cases, small businesses may save money by using payroll
processing software instead of other alternatives. Small business owners can
purchase an affordable system accessible on their local computer or via a cloud
(3)
service, using a pay-as-you-go model in many cases. Purchasing software
eliminates the expense of hiring an in-house accountant for payroll processing.
Companies can also avoid working with a third party for payroll processing,
keeping the information in-house. Lastly, small business owners can maintain
more control of the payroll process by using software.
Using payroll software allows the business to compile reports at whatever pace
they desire and to make changes quickly if the need arises. This can be more
efficient than trying to manually create reports or get in contact with a third
party payroll company to make changes.
1.1 BACKGROUND
(4)
The basic idea can be depicted on figure :
1.2 OBJECTIVE
The primary objective of the Payroll System (PR System) by Léger Systems
is to process payroll information in an online environment, so specific
online procedures can be performed in seconds rather than the hours
required by traditional batch methods of computer processing. This PR
system performs the basic payroll objectives by providing a complete and
accurate record of all payroll transactions affecting each hourly and salaried
employee.
Specific employee payroll features and objectives of this business
software application are highlighted below :
1. Maintain a Labor Detail Record on the number of hours worked and the
types of work done by hourly employees during a payroll period, as well as
the associated general ledger account distribution information for labor
expense.
(5)
2. Calculate gross pay for hourly employees based on the hours worked
including overtime, if any. The gross pay for salaried employees is
predefined for each payroll period in their Employee Master Record.
3. Automatically calculate required federal and state payroll taxes, such as
income tax withholding, Medicare, FICA and unemployment tax, for both
employee and employer. The results are stored in a Payroll Period Record
for each pay period.
4. Print payroll checks with stubs on preprinted forms showing current period
and year-todate (YTD) dollar earnings and deductions. These same multi-
purpose check forms can be used by the Accounts Payable System. Pay
checks can be printed for a single employee or for a specified group of
employees.
5. Print payroll reports, such as Labor Edit Report, Hours Distribution Report
and Payroll Register, to provide an audit trail of payroll data entered into the
system, so adequate audit control is maintained.
6. Print generalized payroll reports with the capability to extract specific
payroll information from the online database, such as "List the total FICA
withheld this quarter for each employee".
7. Enable the user to change the federal and state tax rates used in calculating
payroll withholding and deductions by storing payroll tax rates in separate
Payroll Rates Records by calendar year. 10
8. Define an Active-Flag to prohibit the current online entry of labor
transactions for an inactive employee, yet keep that old code for historical
reporting purposes.
(6)
1.3 PURPOSE AND SCOPE
The proposed system is for local government unit which uses programming
language C++ as the front-end and MYSQL as the back-end.
Categorizing of employee based on their status. If the employee is
contractual or permanent.
Adjusting of salary when the employee gets promoted or demoted.
Filtering of payroll report per department.
The proposed system has an active or inactive indicator of employee who
terminated, end of contract, resigned or retired.
Importing or exporting of attendance report.
(7)
2.SURVEY OF TECHNOLOGIES
(8)
SURVEY OF TECHNOLOGIES
FRONT END :
(9)
Features of C++
But in another term, portability refers to using the same piece of code in varied
environments.
Let us understand this C++ feature with the help of an example. Suppose you
write a piece of code to find the name, age, and salary of an employee in
Microsoft Windows and for some apparent reason you want to switch your
operating system to LINUX. This code will work in a similar fashion as it did in
Windows.
3. Simple
When we start off with a new language, we expect to understand in-depth. The
simple context of C++ gives an appeal to programmers, who are eager to learn a
new programming language.
If you are already familiar with C, then you don’t need to worry about facing
any trouble while working in C++. The syntax of C++ is almost similar to that
of C. After all C++ is referred to as “C with classes”.
(11)
5. Popular
After learning C, it is the base language for many other popular programming
languages which supports the feature of object-oriented programming. Bjarne
Stroustrup found Simula 67, the first object-oriented language ever, lacking
simulations and decided to develop C++.
6. Case sensitive
Just like C, it is pretty clear that the C++ programming language treats the
uppercase and lowercase characters in a different manner. For instance, the
meaning of the keyword ‘cout’ changes if we write it as ‘Cout’ or “COUT”.
Other programming languages like HTML and MySQL are not case sensitive.
7. Compiler-Based
9. Existence of Libraries
The C++ programming language offers a library full of in-built functions that
make things easy for the programmer. These functions can be accessed by
including suitable header files.
10. Speed
(12)
BACK END :
MySQL can be used for a variety of applications, but is most commonly found
on Web servers. A website that uses MySQL may include Web pages that
access information from a database. These pages are often referred to as
"dynamic," meaning the content of each page is generated from a database as
the page loads. Websites that use dynamic Web pages are often referred to as
database-driven websites.
Many database-driven websites that use MySQL also use a Web scripting
language like PHP to access information from the database. MySQL commands
can be incorporated into the PHP code, allowing part or all of a Web page to be
generated from database information. Because both MySQL and PHP are both
open source (meaning they are free to download and use), the PHP/MySQL
combination has become a popular choice for database-driven websites.
(13)
MySQL works on many operating systems and with many languages
including PHP, PERL, C, C++, JAVA, etc.
MySQL works very quickly and works well even with large data sets.
MySQL is very friendly to PHP, the most appreciated language for web
development.
MySQL supports large databases, up to 50 million rows or more in a table.
The default file size limit for a table is 4GB, but you can increase this (if
your operating system can handle it) to a theoretical limit of 8 million
terabytes (TB).
MySQL is customizable. The open-source GPL license allows
programmers to modify the MySQL software to fit their own specific
environments.
1. Open-Source
MySQL stores data efficiently in the memory ensuring that data is consistent,
and not redundant. Hence, data access and manipulation using MySQL is quick.
3. Scalable
Scalability refers to the ability of systems to work easily with small amounts of
data, large amounts of data, clusters of machines, and so on. MySQL server was
developed to work with large databases.
(14)
4. Data Types
It contains multiple data types such as unsigned integers, signed integers, float
(FLOAT), double (DOUBLE), character (CHAR), variable character
(VARCHAR), text, blob, date, time, datetime, timestamp, year, and so on.
5. Character Sets
It supports different character sets, and this includes latin1 (cp1252 character
encoding), German, Ujis, other Unicode character sets and so on.
6. Secure
It comes with support for large databases, which could contain about 40 to 50
million records, 150,000 to 200,000 tables and up to 5,000,000,000 rows.
MySQL server also comes with many client and utility programs. This
includes Command line programs such as ‘mysqladmin’ and graphical
programs such as ‘MySQL Workbench’. MySQL client programs are written
in a variety of languages. Client library (code encapsulated in a module) can
be written in C or C++ and would be available for clients that have C binding
(15)
2.1 SOFTWARE AND HARDWARE SPECIFICATION :
2.1.1 SOFTWARE SPECIFICATION :
(16)
Tool for evaluating the quality of a project, because a final review should
examine whether each requirements has been met.
(17)
3.SYSTEM ANALYSIS
(18)
SYSTEM ANALYSIS
The old manual system was suffering from a series of drawbacks. Since
whole of the system was to be maintained with hands the process of keeping,
maintaining and retrieving the information was very tedious and lengthy. The
records were never used to be in a systematic order. There used to be lots of
difficulties in associating any particular transaction with a context. If any
information was to be found it was required to go through the different registers,
documents there would never exist anything like report generation. There would
always be unnecessary consumption of time while entering records and
retrieving records. Once the records were entered it was very difficult to update
these records.
Documents and reports that must be provided by the new system: there
can also be few reports, which can help management in decision making
and cost controlling, but since these reports do not get required attention,
such kind of reports and information were also identified and given
required attention.
(20)
Details of the information needed for each document and report.
The required frequency and distribution for each document.
Probable sources of information for each document and report.
With the implementation of computerized system, the task of keeping
records in an organised manner will be solved. The greatest of all is the
retrieval of information, which will be at the click of the mouse. So, the
proposed system helps in saving the time in different operation and
making information flow every giving valuable reports.
(21)
performed successfully. To evaluate feasibility, a feasibility study is
performed.
To determine whether the software can be implemented using the current
technology and within the specified budget and schedule A feasibility study
is a preliminary investigation of a proposed system to decide whether the
system can run smoothly with the organization.
To determine whether the software can be integrated with other existing
software. benefits that are expected and to decide will the organization go for
it.
1. Technical Feasibility.
2. Operational Feasibility.
3. Economical Feasibility
1. ECONOMICAL FEASIBILITY :
(22)
i. Cost incurred on software development to produce long-term gains for an
organization. Economic feasibility is a measure of the cost-effectiveness of a
project or solution. As a part of this, the costs and benefits associated.
ii. Cost required to conduct full software investigation (such as requirements
elicitation and requirements analysis). The system also reduces the
administrative and technical staff to do various jobs that single software can
do.
iii. Cost of hardware, software, development team, and training. Feasible only if
tangible and intangible benefits outweigh the cost. The cost for proposed
online shopping system is outweighing the cost and efforts involved in
iv. Cost involves in purchase or rental of equipment the cost for proposed online
shopping system is outweighing the cost and efforts involved.
v. Cost of phones & mobile communication equipment
vi. Cost of Salaries of Employees.
vii. Cost of maintenance of equipment
2. TECHNICAL FEASIBILITY :
In this, one has to test whether the system can be developed using existing
technology or not. It is evident that necessary hardware and software are
available for development and implementation of proposed system. We
acquired the technical knowledge of working in languages, and then only we
have started designing our project. The system is self-explanting and does not
need any entire sophisticated training. A system has been built by concentrating
on the graphical user interface concepts, the application can also be handled
very easily with a novice uses. The overall time that a user needs to get trained
is less than 15 minutes.The system has been added with features of menu device
and button interaction methods, which makes him the master as he starts
working through the environment. As the software that were used as developing
(23)
this application are very economical and are readily available is themarket the
only time that is lost by the customer is just installation time. Technical
feasibility performs following tasks.
Operational feasibility means how much the system is user interactive. In this
project, the management will know the details of each project where he may be
presented and the data will be maintained as decentralized and if any inquires
for that particular contract can be known as per their requirements and
necessaries. Operational feasibility also performs following tasks.
(24)
4. Determines whether the organization is satisfied by the alternative
solutions proposed by the software development team.
5. It finds if any job reconstruction is required or not?
6. vi. Watches the feelings of the customers as well as user. System should
provide right & accurate information to user or customer at right place as
well as at right time.
(25)
4.REQUIREMENT ANALYSIS
(26)
REQUIREMENT ANALYSIS
OnPay is based in Atlanta. It automates payment workflows and tax filing, and
streamlines payroll processes. Entering essential payroll info such as hours, tips,
bonuses, and reimbursements is seamlessly performed. Plus, it manages
unlimited payroll runs for 1099 contract workers and W-2 employees. OnPay
takes care of calculating your federal and state payroll taxes, and filing of tax
forms. They are very confident of their accuracy and are willing to take
responsibility in case there are any errors in tax calculation and filing.
ADP Workforce now, The parent company ADP provides payroll, global
HCM, and outsourcing services in 113 countries. ADP Workforce Now is an
online HR software designed for midsize companies. This platform collects and
automates your company’s HR processes in a single dashboard. Top features
(27)
include benefits management, payroll, talent management, and time and
attendance. You can use this effective tool to manage your staff members’
holidays and benefits, and effortlessly generate insightful reports. The vendor
provides video tutorials, demo, and online support to help you make good use of
the software.
Xerois based in New Zealand and was founded in 2006. This accounting
software is popular in the US, UK, European, and Australian markets. From
modest beginnings, the company has grown worldwide and currently has 20
offices around the globe. This software is easy to launch and use, and doesn’t
need complex training. It simplifies tedious financial operations from data entry
to deep accounting, and helps you save the time spent on searching voluminous
records. Users can manage all contacts and transactions from the same page.
Key features include GST returns, fixed assets, multi-currency, inventory, and
financial reporting.
Wave, was founded in 2010 in Canada and it has built an impressive track
record since then. The company boasts 3 million customers and has recorded
more than $200 billion in income and expenses tracked, $77 million in
investments, and $20 billion in invoices sent annually. Wave is a free app that
(28)
offers accounting, receipt scanning, and invoicing features that are ideal for
small businesses and self-employed professionals such as consultants,
freelancers, and entrepreneurs. The platform is simple to set up and use, and
presents an easily navigable dashboard that displays all you need to view. It
simplifies invoicing and accounting processes, and enables you to effortlessly
manage employees and taxes, chase payments, and track expenses.
Zenefits, was founded in San Francisco in 2013. Today, the company boasts
over 10,000 small to midsize business clients located in all 50 states, greater
than 500,000 employees onboarded, and more than 500 employees in its offices
in the US, India, and Canada. The software simplifies HR administration and
complex payroll processes, and helps businesses make good use of theirlimited
resources. Key features include payroll sync, insurance benefits, employee
directory, business intelligence, mobile optimization, ACA compliance, hiring
and onboarding, customer support and more. The platform integrates all HR
solutions in a single easy-to-use dashboardwhich gives companies greater
control and more confidence in their compliance as well as better access for
their employees.
Intuit Payroll, develops and sells accounting, financial, and tax preparation
software products for small businesses, individual users, and accountants. Intuit
Payroll offers affordable yet robust packages that can suit the needs of budgets
of different types of companies. They can use this application to pay their staff
members on time and accurately, while saving time doing this process. With
this platform, you can automate payroll tax calculations, generate unlimited
paychecks and more. The vendor is renowned for providing top notch support
from live specialists. Main features include step-by-step assistance with setup,
compliance service, workers’ compensation, hiring tips and tools, and online
chat with a payroll expert.
(29)
4.2PROPOSED SYSTEM :
This chapter builds on the work done in the Analysis Chapter and gives
documentation for the Design of the Payroll Management System. The PMS is
modelled in terms of objects and classes and their interactions with each other.
Explanation of the proposed system is done as well structure of the Entity
Relationship Diagram (ERD). Design of the User Interface is also discussed.The
proposed system is designed to eliminate all the drawbacks of the existing
payroll management software. The system shall be responsible for maintaining
information about employees, thus their personal profile. The system shall
incorporate leave management all theway from application to
acceptance/rejection of leave requests as well as all employee projects with
close monitoring of the projects from creation to completion and trainings to
assist in monitoring active and inactive employees.
The new system will help the organization to set rates for each category which
will help in preparing ledger, balance sheet easily and perform automatic
processing without human intervention. For making ledger, it will takes inputs
on employees working modules such as type of work, their designation, rate per
day, tax deduction on monthly basis and bonus or increment on fixed interval of
days etc. As salary statement and payment sheet need to be prepared as and
when required so each employees will be differtiated using their employee’s id.
Pay slip will give the entire information which help the working employees to
get clear picture for their salary and creating a fair environment for working
organization.
(30)
The main features to be added include:
Employee profiles
Salary management
Task management
Notifications
Employee Self-Service (ESS)
Consistent - The website should have a similar look and feel on every page.
Every page should have the same header/logo, heading style, fonts, navigations
etc. Efficient and easy to maintain-This refers to the fact that there is need to
separate content from layout, so that you can easily change your page design
without editing every page on the site. Layout-The layout of each page should
have a good contrast between the text and background area. This helps
considerably with visibility as it will be difficult to read the text if it is almost
the same color as the background. Monitor size should also be taken into
consideration. Easy to navigate and use-Users should not have a hard time
trying to navigate the site. Navigation links should be consistent and clearly
labelled. All navigation links should also be working properly and should point
to the intended page/site. Browser compatible-When designing the site consider
different browser environments. Extensive testing should be done on each page
in all the major browsers and the design changed appropriately to cater for
all.Visually appealing-The use of color, text, font sand graphics should be
carefully considered and used to ensure that the site is visually appealing to its
visitors.
(31)
FEATURES :
Portability
Compatibility
Secure
User Friendly
Generosity
Runtime Compactness and Speed
Advantages :
(32)
4.3DATA FLOW DIAGRAM (DFD)
A Data Flow Diagram (DFD) is a structured analysis and design tool that can be
used for flowcharting. A DFD is a network that describes the flow of data and
the processes that change or transform the data throughout a system. This
network is constructed by using a set of symbols that do not imply any physical
implementation. It has the purpose of clarifying system requirements and
identifying major transformations. So it is the starting point of the design phase
that functionally decomposes the requirements specifications down to the
lowest level of detail. DFD can be considered to an abstraction of the logic of an
information oriented or a processoriented system flow-chart. For these reasons
DFD’s are often referred to as logical data flow diagrams
Components of DFD :
1.Processes : Processes are the essential activities, carried out within the system
boundary, that use information. A process is represented in the model only
where the information which provides the input into the activity is manipulated
or transformed in some way, so that the data flowing out of the process is
changed compared to that which flowed in. The activity may involve capturing
information about something that the organization is interested in, such as a
customer or a customer's maintenance call. It may be concerned with recording
changes to this information, a change in a customer's address for example. It
may require calculations to be carried out, such as the quantity left in stock
following the allocation of stock items to a customer's job; or it may involve
validating information, such as checking that faulty equipment is covered by a
maintenance contract.
(33)
Fig 1.Diagram of the process
3.Data stores : A data store is a place where data is stored and retrieved within
the system. This may be a file, Customer Contracts file for example, a catalogue
or reference list, Options Lists for example, a log book such as the Job Book,
and so on.
(34)
4.External Entities : External entities are entities outside of the system
boundary which interact with the system, in that they send information into the
system or receive information from it. External entities may be external to the
whole organization as in Customer and Supplier in our running example; or just
external to the application area where users' activities are not directly supported
by the system under investigation. Accounts and Engineering are shown as
external entities as they are recipients of information from the system. Sales
also provide input to the system. External entities are often referred to as
sources and sinks. All information represented within the system is sourced
initially from an external entity. Data can leave the system only via an external
entity.
(35)
DFD OF PAYROLL MANAGEMENT SYSTEM :
This is the Zero Level DFD of Payroll Management System, where we have
eloborated the high level process of Payroll. It's a basic overview of the whole
Payroll Management System or process being analyzed or modeled. It's
designed to be an at-a-glance view of Task, Pay-Slip and Department showing
the system as a single high-level process, with its relationship to external
entities of Employee, Attendance and Leave. It should be easily understood by a
wide audience, including Employee,Leave and Task In zero leve DFD of
Payroll Management System, we have described the high level flow of the
Payroll system.
(36)
First Level Data Flow Diagram Of Payroll Management System :
First Level DFD (1st Level) of Payroll Management System shows how the
system is divided into sub-systems (processes), each of which deals with one or
more of the data flows to or from an external agent, and which together provide
all of the functionality of the Payroll Management System system as a whole. It
also identifies internal data stores of Department, Pay-Slip, Task, Salary, Leave
that must be present in order for the Payroll system to do its job, and shows the
flow of data between the various parts of Employee, Leave, Pay-Slip,
Department, Task of the system. DFD Level 1 provides a more detailed
breakout of pieces of the 1st level DFD. You will highlight the main
functionalities of Payroll.
(37)
Second Level Data Flow Diagram OF Payroll Management System :
DFD Level 2 then goes one step deeper into parts of Level 1 of Payroll. It may
require more functionalities of Payroll to reach the necessary level of detail
about the Payroll functioning. First Level DFD (1st Level) of Payroll
Management System shows how the system is divided into sub-systems
(processes). The 2nd Level DFD contains more details of Department, Pay-Slip,
Task, Salary, Leave, Attendance, Employee.
(38)
5.SOFTWARE DESIGN
(39)
SOFTWARE DESIGN
System design is the solution for the creation of a new system. This phase
focuses on the detailed implementation of the feasible system. It emphasis on
translating design. Specifications to performance specification. System design
has two phases of development. They are logical design and physical design.
During logical design phase the analyst describes inputs (sources), outputs
(destinations), databases (data stores) and procedures (data flows) all in a format
that meets the user requirements. The analyst also specifies the needs of the user
at a level that virtually determines the information flow in and out of the system
and the data resources. Here the logical design is done through data flow
diagrams and database design. The physical design is followed by physical
design or coding. Physical design produces the working system by defining the
design specifications which specify exactly what the candidate system must do.
The programmers write the necessary programs that accept input from the user
perform necessary processing on accepted data and produce the required report
on a hard copy or display it on the screen
In this phase, a logical system is built which is fulfils the given requirements.
Design phase of software development deals with transforming the client’s
requirements into a logically working system. Normally, design is performed in
the following two steps:
In this phase, the system is designed at block level. The blocks are created on
the basis of analysis done in the problem identification phase. Different blocks
are created for different functions emphasis is on minimizing information flow
between blocks. Thus, all activities which require more interaction are kept in
one block.
(40)
2) SECONDARY DESIGN PHASE :
The general tasks involved in the design process are the following:
1) Design various blocks for overall system processes.
2) Design smaller, compact and workable modules in each block.
3) Design various database structures.
4) Specify details of programs to achieve desired functionality.
5) Design the form of inputs, and outputs of the system.
6) Perform documentation of the design.
7) System reviews.
5.2DESIGN TECHNIQUE :
(41)
5.3 DATABASE DESIGN :
The relational database model was used in the design of the database for the
Payroll Management System application. According to Lit win P., “The basic
idea behind the relational model is that a database consists of a series of un-
ordered tables (or relations) that can be manipulated using non –
procedural operations that return tables”.
The benefits of a database that has been designed according to the relational
model are:
Normalization was used to simplify the design of the database in order to bring
it to optimum structure.
(43)
supervises relationship between an employee and a department, a performs
relationship between an artist and a song, a proves relationship between a
mathematician and a conjecture, etc.
(44)
Payments Entity : Attributes of Payments are payment_id,
payment_customer_id, payment_date, payment_amount,
payment_description
(45)
5.3.2 TABLE STRUCUTRE :
(46)
5.3.3 INPUT SCREEN :
(47)
FOR SEARCHING OR DISPLAY RECORD OF EMPLOYEE :
(48)
FOR SALARY SLIP OF EMPLOYEE :
(49)
FOR MODIFY RECORD OF EMPLOYEES :
(50)
FOR DELETING EMPLOYEES DATA :
(51)
5.3.4 CODING :
//**********************************************************
// PROJECT PAYROLL
//**********************************************************
//**********************************************************
// INCLUDED HEADER FILES
//**********************************************************
#include <iostream.h>
#include <fstream.h>
#include <process.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
//**********************************************************
// THIS CLASS CONTAINS ALL THE DRAWING FUNCTIONS
//**********************************************************
class LINES
{
public :
void LINE_HOR(int, int, int, char) ;
void LINE_VER(int, int, int, char) ;
void BOX(int,int,int,int,char) ;
void CLEARUP(void) ;
void CLEARDOWN(void) ;
};
//**********************************************************
// THIS CLASS CONTROL ALL THE FUNCTIONS IN THE MENU
//**********************************************************
(52)
class MENU
{
public :
void MAIN_MENU(void) ;
private :
void EDIT_MENU(void) ;
void INTRODUCTION(void) ;
};
//**********************************************************
// THIS CLASS CONTROL ALL THE FUNCTIONS RELATED TO
EMPLOYEE
//**********************************************************
class EMPLOYEE
{
public :
void NEW_EMPLOYEE(void) ;
void MODIFICATION(void) ;
void DELETION(void) ;
void DISPLAY(void) ;
void LIST(void) ;
void SALARY_SLIP(void) ;
private :
void ADD_RECORD(int, char[], char[], char[], int, int, int, char[], char,
char, char, float, float) ;
void MODIFY_RECORD(int, char [], char [], char [], char [], char, char,
char, float, float) ;
void DELETE_RECORD(int) ;
int LASTCODE(void) ;
int CODEFOUND(int) ;
int RECORDNO(int) ;
int FOUND_CODE(int) ;
void DISPLAY_RECORD(int) ;
int VALID_DATE(int, int, int) ;
(53)
int code, dd, mm, yy ;
char name[26], address[31], phone[10], desig[16] ;
char grade, house, convense ;
float loan, basic ;
};
//**********************************************************
// THIS FUNCTION CONTROL ALL THE FUNCTIONS IN THE MAIN
MENU
//**********************************************************
(54)
cout <<"0: QUIT" ;
gotoxy(30,18) ;
cout <<"ENTER YOUR CHOICE :" ;
gotoxy(5,23);
cout<<" ";
ch = getch() ;
if (ch == 27 || ch == '0')
break ;
else if (ch == '1')
{
EMPLOYEE E ;
E.NEW_EMPLOYEE() ;
}
else if (ch == '2')
{
EMPLOYEE E ;
E.DISPLAY() ;
}
else if (ch == '3')
{
EMPLOYEE E ;
E.LIST() ;
}
else if (ch == '4')
{
EMPLOYEE E ;
E.SALARY_SLIP() ;
}
else if (ch == '5')
EDIT_MENU() ;
}
L.CLEARUP() ;
}
//**********************************************************
(55)
// THIS FUNCTION CONTROL ALL THE FUNCTIONS IN THE EDIT
MENU
//**********************************************************
(56)
}
}
L.CLEARDOWN() ;
}
//**********************************************************
// THIS FUNCTION DRAWS THE HORRIZONTAL LINE
//**********************************************************
//**********************************************************
// THIS FUNCTION DRAWS THE VERTICAL LINE
//**********************************************************
void LINES :: BOX(int column1, int row1, int column2, int row2, char c)
{
char ch=218 ;
(57)
char c1, c2, c3, c4 ;
char l1=196, l2=179 ;
if (c == ch)
{
c1=218 ;
c2=191 ;
c3=192 ;
c4=217 ;
l1 = 196 ;
l2 = 179 ;
}
else
{
c1=c ;
c2=c ;
c3=c ;
c4=c ;
l1 = c ;
l2 = c ;
}
gotoxy(column1,row1) ;
cout <<c1 ;
gotoxy(column2,row1) ;
cout <<c2 ;
gotoxy(column1,row2) ;
cout <<c3 ;
gotoxy(column2,row2) ;
cout <<c4 ;
column1++ ;
column2-- ;
LINE_HOR(column1,column2,row1,l1) ;
LINE_HOR(column1,column2,row2,l1) ;
column1-- ;
column2++ ;
row1++ ;
row2-- ;
LINE_VER(row1,row2,column1,l2) ;
(58)
LINE_VER(row1,row2,column2,l2) ;
}
//**********************************************************
// THIS FUNCTION CLEAR THE SCREEN LINE BY LINE UPWARD
//**********************************************************
(59)
file.open("EMPLOYEE.DAT", ios::app) ;
code = ecode ;
strcpy(name,ename) ;
strcpy(address,eaddress) ;
strcpy(phone,ephone) ;
dd = d ;
mm = m ;
yy = y ;
strcpy(desig,edesig) ;
grade = egrade ;
house = ehouse ;
convense = econv ;
loan = eloan ;
basic = ebasic ;
file.write((char *) this, sizeof(EMPLOYEE)) ;
file.close() ;
}
//**********************************************************
// THIS FUNCTION MODIFY THE GIVEN DATA IN THE
// EMPLOYEE'S FILE
//**********************************************************
(60)
loan = eloan ;
basic = ebasic ;
int location ;
location = (recno-1) * sizeof(EMPLOYEE) ;
file.seekp(location) ;
file.write((char *) this, sizeof(EMPLOYEE)) ;
file.close() ;
}
//**********************************************************
// THIS FUNCTION DELETE THE RECORD IN THE EMPLOYEE FILE
// FOR THE GIVEN EMPLOYEE CODE
//**********************************************************
(61)
if ( temp.eof() )
break ;
file.write((char *) this, sizeof(EMPLOYEE)) ;
}
file.close() ;
temp.close() ;
}
//**********************************************************
// THIS FUNCTION RETURNS THE LAST EMPLOYEE'S CODE
//**********************************************************
(62)
break ;
}
}
file.close() ;
return found ;
}
//**********************************************************
// THIS FUNCTION RETURNS RECORD NO. OF THE GIVEN CODE
//**********************************************************
//**********************************************************
// THIS FUNCTION DISPLAYS THE LIST OF THE EMPLOYEES
//**********************************************************
(63)
cout <<"LIST OF EMPLOYEES" ;
gotoxy(30,3) ;
cout <<"~~~~~~~~~~~~~~~~~~~" ;
gotoxy(1,4) ;
cout <<"CODE NAME PHONE DOJ
DESIGNATION GRADE SALARY" ;
gotoxy(1,5) ;
cout
<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~" ;
fstream file ;
file.open("EMPLOYEE.DAT", ios::in) ;
file.seekg(0,ios::beg) ;
while (file.read((char *) this, sizeof(EMPLOYEE)))
{
flag = 0 ;
delay(20) ;
found = 1 ;
gotoxy(2,row) ;
cout <<code ;
gotoxy(6,row) ;
cout <<name ;
gotoxy(31,row) ;
cout <<phone ;
gotoxy(40,row) ;
cout <<dd <<"/" <<mm <<"/" <<yy ;
gotoxy(52,row) ;
cout <<desig ;
gotoxy(69,row) ;
cout <<grade ;
if (grade != 'E')
{
gotoxy(74,row) ;
cout <<basic ;
}
else
{
(64)
gotoxy(76,row) ;
cout <<"-" ;
}
if ( row == 23 )
{
flag = 1 ;
row = 6 ;
gotoxy(1,25) ;
cout <<"Press any key to continue or Press <ESC> to exit" ;
ch = getch() ;
if (ch == 27)
break ;
clrscr() ;
gotoxy(31,2) ;
cout <<"LIST OF EMPLOYEES" ;
gotoxy(30,3) ;
cout <<"~~~~~~~~~~~~~~~~~~~" ;
gotoxy(1,4) ;
cout <<"CODE NAME PHONE DOJ
DESIGNATION GRADE SALARY" ;
gotoxy(1,5) ;
cout
<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~" ;
}
else
row++ ;
}
if (!found)
{
gotoxy(5,10) ;
cout <<"\7Records not found" ;
}
if (!flag)
{
gotoxy(1,25) ;
cout <<"Press any key to continue..." ;
(65)
getche() ;
}
file.close () ;
}
//**********************************************************
// THIS FUNCTION DISPLAYS THE RECORD OF THE EMPLOYEES
//**********************************************************
(66)
gotoxy(5,17) ;
cout <<"Designation : " <<desig ;
gotoxy(5,18) ;
cout <<"Grade : " <<grade ;
if (grade != 'E')
{
gotoxy(5,19) ;
cout <<"House (y/n) : " <<house ;
gotoxy(5,20) ;
cout <<"Convense (y/n) : " <<convense ;
gotoxy(5,22) ;
cout <<"Basic Salary : " <<basic ;
}
gotoxy(5,21) ;
cout <<"Loan : " <<loan ;
}
}
file.close() ;
}
//**********************************************************
// THIS FUNCTION GIVE DATA TO ADD IN THE FILE
//**********************************************************
(67)
cout <<"~~~~~~~~~~~~~" ;
gotoxy(5,7) ;
cout <<"Name :";
gotoxy(5,8) ;
cout <<"Address :";
gotoxy(5,9) ;
cout <<"Phone no. : " ;
gotoxy(5,11) ;
cout <<"JOINING DATE" ;
gotoxy(5,12) ;
cout <<"~~~~~~~~~~~~" ;
gotoxy(5,13) ;
cout <<"Day : " ;
gotoxy(5,14) ;
cout <<"Month : " ;
gotoxy(5,15) ;
cout <<"Year : " ;
gotoxy(5,17) ;
cout <<"Designation : " ;
gotoxy(5,18) ;
cout <<"Grade :";
gotoxy(5,21) ;
cout <<"Loan :";
ecode = LASTCODE() + 1 ;
if (ecode == 1)
{
ADD_RECORD(ecode, "null", "null", "null", 0, 0, 0, "null", 'n', 'n', 'n',
0.0, 0.0) ;
DELETE_RECORD(ecode) ;
}
gotoxy(21,5) ;
cout <<ecode ;
do
{
valid = 1 ;
gotoxy(5,25) ;
(68)
clreol() ;
cout <<"Enter the name of the Employee" ;
gotoxy(20,7) ;
clreol() ;
gets(ename) ;
strupr(ename) ;
if (ename[0] == '0')
return ;
if (strlen(ename) < 1 || strlen(ename) > 25)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly (Range: 1..25)" ;
getch() ;
}
}
while (!valid) ;
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Address of the Employee" ;
gotoxy(20,8) ;
clreol() ;
gets(eaddress) ;
strupr(eaddress) ;
if (eaddress[0] == '0')
return ;
if (strlen(eaddress) < 1 || strlen(eaddress) > 30)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly (Range: 1..30)" ;
getch() ;
(69)
}
}
while (!valid) ;
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Phone no. of the Employee or Press <ENTER> for
none" ;
gotoxy(20,9) ;
clreol() ;
gets(ephone) ;
if (ephone[0] == '0')
return ;
if ((strlen(ephone) < 7 && strlen(ephone) > 0) || (strlen(ephone) > 9))
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly" ;
getch() ;
}
}
while (!valid) ;
if (strlen(ephone) == 0)
strcpy(ephone,"-") ;
char tday[3], tmonth[3], tyear[5] ;
int td ;
do
{
valid = 1 ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER DAY OF JOINING" ;
(70)
gotoxy(13,13) ;
clreol() ;
gets(tday) ;
td = atoi(tday) ;
d = td ;
if (tday[0] == '0')
return ;
}
while (d == 0) ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER MONTH OF JOINING" ;
gotoxy(13,14) ;
clreol() ;
gets(tmonth) ;
td = atoi(tmonth) ;
m = td ;
if (tmonth[0] == '0')
return ;
}
while (m == 0) ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER YEAR OF JOINING" ;
gotoxy(13,15) ;
clreol() ;
gets(tyear) ;
td = atoi(tyear) ;
y = td ;
if (tyear[0] == '0')
return ;
}
while (y == 0) ;
(71)
if (d>31 || d<1)
valid = 0 ;
else if (((y%4)!=0 && m==2 && d>28) || ((y%4)==0 && m==2 &&
d>29))
valid = 0 ;
else if ((m==4 || m==6 || m==9 || m==11) && d>30)
valid = 0 ;
else if (y<1990 || y>2020)
valid = 0 ;
if (!valid)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly" ;
getch() ;
gotoxy(13,14) ;
clreol() ;
gotoxy(13,15) ;
clreol() ;
}
}
while (!valid) ;
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Designation of the Employee" ;
gotoxy(20,17) ;
clreol() ;
gets(edesig) ;
strupr(edesig) ;
if (edesig[0] == '0')
return ;
if (strlen(edesig) < 1 || strlen(edesig) > 15)
{
(72)
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly (Range: 1..15)" ;
getch() ;
}
}
while (!valid) ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Grade of the Employee (A,B,C,D,E)" ;
gotoxy(20,18) ;
clreol() ;
egrade = getche() ;
egrade = toupper(egrade) ;
if (egrade == '0')
return ;
}
while (egrade < 'A' || egrade > 'E') ;
if (egrade != 'E')
{
gotoxy(5,19) ;
cout <<"House (y/n) : " ;
gotoxy(5,20) ;
cout <<"Convense (y/n) : " ;
gotoxy(5,22) ;
cout <<"Basic Salary : " ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER IF HOUSE ALLOWANCE IS ALLOTED TO
EMPLOYEE OR NOT" ;
gotoxy(22,19) ;
clreol() ;
(73)
ehouse = getche() ;
ehouse = toupper(ehouse) ;
if (ehouse == '0')
return ;
}
while (ehouse != 'Y' && ehouse != 'N') ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER IF CONVENCE ALLOWANCE IS ALLOTED
TO EMPLOYEE OR NOT" ;
gotoxy(22,20) ;
clreol() ;
econv = getche() ;
econv = toupper(econv) ;
if (econv == '0')
return ;
}
while (econv != 'Y' && econv != 'N') ;
}
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER LOAN AMOUNT IF ISSUED" ;
gotoxy(22,21) ;
clreol() ;
gets(t1) ;
t2 = atof(t1) ;
eloan = t2 ;
if (eloan > 50000)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
(74)
cout <<"\7SHOULD NOT GREATER THAN 50000" ;
getch() ;
}
}
while (!valid) ;
if (egrade != 'E')
{
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER BASIC SALARY OF THE EMPLOYEE" ;
gotoxy(22,22) ;
clreol() ;
gets(t1) ;
t2 = atof(t1) ;
ebasic = t2 ;
if (t1[0] == '0')
return ;
if (ebasic > 50000)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7SHOULD NOT GREATER THAN 50000" ;
getch() ;
}
}
while (!valid) ;
}
gotoxy(5,25) ;
clreol() ;
do
{
gotoxy(5,24) ;
clreol() ;
(75)
cout <<"Do you want to save (y/n) " ;
ch = getche() ;
ch = toupper(ch) ;
if (ch == '0')
return ;
}
while (ch != 'Y' && ch != 'N') ;
if (ch == 'N')
return ;
ADD_RECORD(ecode, ename, eaddress, ephone, d, m, y, edesig,
egrade, ehouse, econv, eloan, ebasic) ;
}
//**********************************************************
// THIS FUNCTION GIVE CODE FOR THE DISPLAY OF THE
RECORD
//**********************************************************
(76)
return ;
}
DISPLAY_RECORD(ecode) ;
gotoxy(5,25) ;
cout <<"Press any key to continue..." ;
getch() ;
}
//**********************************************************
// THIS FUNCTION GIVE DATA FOR THE MODIFICATION OF THE
// EMPLOYEE RECORD
//**********************************************************
(77)
cout <<"<0>=EXIT" ;
gotoxy(22,3) ;
cout <<"MODIFICATION OF THE EMPLOYEE RECORD" ;
DISPLAY_RECORD(ecode) ;
do
{
gotoxy(5,24) ;
clreol() ;
cout <<"Do you want to modify this record (y/n) " ;
ch = getche() ;
ch = toupper(ch) ;
if (ch == '0')
return ;
}
while (ch != 'Y' && ch != 'N') ;
if (ch == 'N')
return ;
clrscr() ;
fstream file ;
file.open("EMPLOYEE.DAT", ios::in) ;
file.seekg(0,ios::beg) ;
while (file.read((char *) this, sizeof(EMPLOYEE)))
{
if (code == ecode)
break ;
}
file.close() ;
gotoxy(5,5) ;
cout <<"Employee Code # " <<ecode ;
gotoxy(5,6) ;
cout <<"~~~~~~~~~~~~~" ;
gotoxy(40,5) ;
cout <<"JOINING DATE : " ;
gotoxy(40,6) ;
cout <<"~~~~~~~~~~~~~~" ;
gotoxy(55,5) ;
cout <<dd <<"/" <<mm <<"/" <<yy ;
(78)
gotoxy(5,7) ;
cout <<"Name :";
gotoxy(5,8) ;
cout <<"Address :";
gotoxy(5,9) ;
cout <<"Phone no. : " ;
gotoxy(5,10) ;
cout <<"Designation : " ;
gotoxy(5,11) ;
cout <<"Grade :";
gotoxy(5,14) ;
cout <<"Loan :";
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"Enter the name of the Employee or <ENTER> FOR NO
CHANGE" ;
gotoxy(20,7) ;
clreol() ;
gets(ename) ;
strupr(ename) ;
if (ename[0] == '0')
return ;
if (strlen(ename) > 25)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly (Range: 1..25)" ;
getch() ;
}
}
while (!valid) ;
if (strlen(ename) == 0)
{
(79)
strcpy(ename,name) ;
gotoxy(20,7) ;
cout <<ename ;
}
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Address of the Employee or <ENTER> FOR NO
CHANGE" ;
gotoxy(20,8) ;
clreol() ;
gets(eaddress) ;
strupr(eaddress) ;
if (eaddress[0] == '0')
return ;
if (strlen(eaddress) > 30)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly (Range: 1..30)" ;
getch() ;
}
}
while (!valid) ;
if (strlen(eaddress) == 0)
{
strcpy(eaddress,address) ;
gotoxy(20,8) ;
cout <<eaddress ;
}
do
{
valid = 1 ;
gotoxy(5,25) ;
(80)
clreol() ;
cout <<"Enter Phone no. of the Employee or or <ENTER> FOR NO
CHANGE" ;
gotoxy(20,9) ;
clreol() ;
gets(ephone) ;
if (ephone[0] == '0')
return ;
if ((strlen(ephone) < 7 && strlen(ephone) > 0) || (strlen(ephone) > 9))
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly" ;
getch() ;
}
}
while (!valid) ;
if (strlen(ephone) == 0)
{
strcpy(ephone,phone) ;
gotoxy(20,9) ;
cout <<ephone ;
}
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Designation of the Employee or <ENTER> FOR NO
CHANGE" ;
gotoxy(20,10) ;
clreol() ;
gets(edesig) ;
strupr(edesig) ;
if (edesig[0] == '0')
return ;
(81)
if (strlen(edesig) > 15)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7Enter correctly (Range: 1..15)" ;
getch() ;
}
}
while (!valid) ;
if (strlen(edesig) == 0)
{
strcpy(edesig,desig) ;
gotoxy(20,10) ;
cout <<edesig ;
}
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"Enter Grade of the Employee (A,B,C,D,E) or <ENTER>
FOR NO CHANGE" ;
gotoxy(20,11) ;
clreol() ;
egrade = getche() ;
egrade = toupper(egrade) ;
if (egrade == '0')
return ;
if (egrade == 13)
{
egrade = grade ;
gotoxy(20,11) ;
cout <<grade ;
}
}
while (egrade < 'A' || egrade > 'E') ;
if (egrade != 'E')
(82)
{
gotoxy(5,12) ;
cout <<"House (y/n) : " ;
gotoxy(5,13) ;
cout <<"Convense (y/n) : " ;
gotoxy(5,15) ;
cout <<"Basic Salary : " ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ALLOTED HOUSE ALLOWANCE ? or <ENTER> FOR
NO CHANGE" ;
gotoxy(22,12) ;
clreol() ;
ehouse = getche() ;
ehouse = toupper(ehouse) ;
if (ehouse == '0')
return ;
if (ehouse == 13)
{
ehouse = house ;
gotoxy(22,12) ;
cout <<ehouse ;
}
}
while (ehouse != 'Y' && ehouse != 'N') ;
do
{
gotoxy(5,25) ;
clreol() ;
cout <<"ALLOTED CONVENCE ALLOWANCE or <ENTER>
FOR NO CHANGE" ;
gotoxy(22,13) ;
clreol() ;
econv = getche() ;
econv = toupper(econv) ;
(83)
if (econv == '0')
return ;
if (econv == 13)
{
econv = convense ;
gotoxy(22,13) ;
cout <<econv ;
}
}
while (econv != 'Y' && econv != 'N') ;
}
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER LOAN AMOUNT or <ENTER> FOR NO
CHANGE" ;
gotoxy(22,14) ;
clreol() ;
gets(t1) ;
t2 = atof(t1) ;
eloan = t2 ;
if (eloan > 50000)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7SHOULD NOT GREATER THAN 50000" ;
getch() ;
}
}
while (!valid) ;
if (strlen(t1) == 0)
{
eloan = loan ;
gotoxy(22,14) ;
(84)
cout <<eloan ;
}
if (egrade != 'E')
{
do
{
valid = 1 ;
gotoxy(5,25) ;
clreol() ;
cout <<"ENTER BASIC SALARY or <ENTER> FOR NO
CHANGE" ;
gotoxy(22,15) ;
clreol() ;
gets(t1) ;
t2 = atof(t1) ;
ebasic = t2 ;
if (t1[0] == '0')
return ;
if (ebasic > 50000)
{
valid = 0 ;
gotoxy(5,25) ;
clreol() ;
cout <<"\7SHOULD NOT GREATER THAN 50000" ;
getch() ;
}
}
while (!valid) ;
if (strlen(t1) == 0)
{
ebasic = basic ;
gotoxy(22,15) ;
cout <<ebasic ;
}
}
gotoxy(5,25) ;
clreol() ;
(85)
do
{
gotoxy(5,18) ;
clreol() ;
cout <<"Do you want to save (y/n) " ;
ch = getche() ;
ch = toupper(ch) ;
if (ch == '0')
return ;
}
while (ch != 'Y' && ch != 'N') ;
if (ch == 'N')
return ;
MODIFY_RECORD(ecode,ename,eaddress,ephone,edesig,egrade,ehouse,e
conv,eloan,ebasic) ;
gotoxy(5,23) ;
cout <<"\7Record Modified" ;
gotoxy(5,25) ;
cout <<"Press any key to continue..." ;
getch() ;
}
//**********************************************************
// THIS FUNCTION GIVE CODE NO. FOR THE DELETION OF THE
// EMPLOYEE RECORD
//**********************************************************
(86)
t2 = atoi(t1) ;
ecode = t2 ;
if (ecode == 0)
return ;
clrscr() ;
if (!FOUND_CODE(ecode))
{
gotoxy(5,5) ;
cout <<"\7Record not found" ;
getch() ;
return ;
}
gotoxy(72,2) ;
cout <<"<0>=EXIT" ;
gotoxy(24,3) ;
cout <<"DELETION OF THE EMPLOYEE RECORD" ;
DISPLAY_RECORD(ecode) ;
do
{
gotoxy(5,24) ;
clreol() ;
cout <<"Do you want to delete this record (y/n) " ;
ch = getche() ;
ch = toupper(ch) ;
if (ch == '0')
return ;
}
while (ch != 'Y' && ch != 'N') ;
if (ch == 'N')
return ;
DELETE_RECORD(ecode) ;
LINES L ;
L.CLEARDOWN() ;
gotoxy(5,23) ;
cout <<"\7Record Deleted" ;
gotoxy(5,25) ;
cout <<"Press any key to continue..." ;
(87)
getch() ;
}
//**********************************************************
// THIS FUNCTION RETURN 0 IF THE GIVEN DATE IS INVALID
//**********************************************************
(88)
clrscr() ;
if (!FOUND_CODE(ecode))
{
gotoxy(5,5) ;
cout <<"\7Record not found" ;
getch() ;
return ;
}
fstream file ;
file.open("EMPLOYEE.DAT", ios::in) ;
file.seekg(0,ios::beg) ;
while (file.read((char *) this, sizeof(EMPLOYEE)))
{
if (code == ecode)
break ;
}
file.close() ;
int d1, m1, y1 ;
struct date d;
getdate(&d);
d1 = d.da_day ;
m1 = d.da_mon ;
y1 = d.da_year ;
char *mon[12]=
{"January","February","March","April","May","June","July","August","Se
ptember","November","December"} ;
LINES L ;
L.BOX(2,1,79,25,219) ;
gotoxy(31,2) ;
cout <<"NADEEM AKHTAR, PGDBA - 200754667" ;
L.LINE_HOR(3,78,3,196) ;
gotoxy(34,4) ;
cout <<"SALARY SLIP" ;
gotoxy(60,4) ;
cout <<"Date: " <<d1 <<"/" <<m1 <<"/" <<y1 ;
gotoxy(34,5) ;
cout <<mon[m1-1] <<", " <<y1 ;
(89)
L.LINE_HOR(3,78,6,196) ;
gotoxy(6,7) ;
cout <<"Employee Name : " <<name ;
gotoxy(6,8) ;
cout <<"Designation : " <<desig ;
gotoxy(67,8) ;
cout <<"Grade : " <<grade ;
L.BOX(6,9,75,22,218) ;
L.LINE_HOR(10,71,20,196) ;
int days, hours ;
if (grade == 'E')
{
do
{
valid = 1 ;
gotoxy(10,21) ;
cout <<"ENTER NO. OF DAYS WORKED IN THE MONTH " ;
gotoxy(10,11) ;
cout <<"No. of Days : " ;
gets(t1) ;
t2 = atof(t1) ;
days = t2 ;
if (!VALID_DATE(days,m1,y1))
{
valid = 0 ;
gotoxy(10,21) ;
cout <<"\7ENTER CORRECTLY ";
getch() ;
gotoxy(10,11) ;
cout <<" ";
}
}
while (!valid) ;
do
{
valid = 1 ;
gotoxy(10,21) ;
(90)
cout <<"ENTER NO. OF HOURS WORKED OVER TIME " ;
gotoxy(10,13) ;
cout <<"No. of hours : " ;
gets(t1) ;
t2 = atof(t1) ;
hours = t2 ;
if (hours > 8 || hours < 0)
{
valid = 0 ;
gotoxy(10,21) ;
cout <<"\7ENTER CORRECTLY ";
getch() ;
gotoxy(10,13) ;
cout <<" ";
}
}
while (!valid) ;
gotoxy(10,21) ;
cout <<" ";
gotoxy(10,11) ;
cout <<" ";
gotoxy(10,13) ;
cout <<" ";
}
gotoxy(10,10) ;
cout <<"Basic Salary : Rs." ;
gotoxy(10,12) ;
cout <<"ALLOWANCE" ;
if (grade != 'E')
{
gotoxy(12,13) ;
cout <<"HRA : Rs." ;
gotoxy(12,14) ;
cout <<"CA : Rs." ;
gotoxy(12,15) ;
cout <<"DA : Rs." ;
}
(91)
else
{
gotoxy(12,13) ;
cout <<"OT : Rs." ;
}
gotoxy(10,17) ;
cout <<"DEDUCTIONS" ;
gotoxy(12,18) ;
cout <<"LD : Rs." ;
if (grade != 'E')
{
gotoxy(12,19) ;
cout <<"PF : Rs." ;
}
gotoxy(10,21) ;
cout <<"NET SALARY : Rs." ;
gotoxy(6,24) ;
cout <<"CASHIER" ;
gotoxy(68,24) ;
cout <<"EMPLOYEE" ;
float HRA=0.0, CA=0.0, DA=0.0, PF=0.0, LD=0.0, OT=0.0, allowance,
deduction, netsalary ;
if (grade != 'E')
{
if (house == 'Y')
HRA = (5*basic)/100 ;
if (convense == 'Y')
CA = (2*basic)/100 ;
DA = (5*basic)/100 ;
PF = (2*basic)/100 ;
LD = (15*loan)/100 ;
allowance = HRA+CA+DA ;
deduction = PF+LD ;
}
else
{
basic = days * 30 ;
(92)
LD = (15*loan)/100 ;
OT = hours * 10 ;
allowance = OT ;
deduction = LD ;
}
netsalary = (basic+allowance)-deduction ;
gotoxy(36,10) ;
cout <<basic ;
if (grade != 'E')
{
gotoxy(22,13) ;
cout <<HRA ;
gotoxy(22,14) ;
cout <<CA ;
gotoxy(22,15) ;
cout <<DA ;
gotoxy(22,19) ;
cout <<PF ;
}
else
{
gotoxy(22,13) ;
cout <<OT ;
}
gotoxy(22,18) ;
cout <<LD ;
gotoxy(33,15) ;
cout <<"Rs." <<allowance ;
gotoxy(33,19) ;
cout <<"Rs." <<deduction ;
gotoxy(36,21) ;
cout <<netsalary ;
gotoxy(2,1) ;
getch() ;
}
(93)
//**********************************************************
// MAIN FUNCTION CALLING MAIN MENU
//**********************************************************
void main(void)
{
MENU menu ;
menu.MAIN_MENU() ;
}
(94)
6.TESTING
(95)
TESTING
The aim of the system testing process was to determine all defects in our
project. The program was subjected to a set of test inputs and various
observations were made and based on these observations it will be decided
whether the program behaves as expected or not.
The procedures belonging to other modules that the module under test
calls.
Non local data structures that module accesses.
A procedure to call the functions of the module under test with
appropriate parameters.
6.2TESTING METHODOLOGIES :
During Test Cases that are good at revealing the presence of faults is central to
successful testing. The reason for this is that if there is a faults in the program,
the program can still provide the expected behavior on the certain inputs. Only
for the set of inputs the faults that exercise the fault in the program will the
output of the program devise from the expected behavior. Hence, it is fair to say
that testing is as good as its test case. The number of test cases used to
determine errs in the program should be minimum.
(96)
6.3QUALITY ATTRIBUTES :
As these two goals are contradictory so the problem of selecting test cases is a
complex one. . While selecting the test cases the primary objective is to ensure
that if there is an error or fault in the program, it is exercised by one of its test
cases. An ideal test case is one which succeeds(meaning that there are no errors,
revealed in its execution) only it there are no errors in the program one possible
set of ideal test cases is one which includes all the possible inputs to the
program. This is often called “exhaustive testing”. However it is impractical
and infeasible as even a small program can have an infinite input domain. So to
avoid this problem we use “test criteria” in selection of the test cases.
The fully automated process of generating test criteria has not been yet found
rather guidelines are only the automated tool available to us previously.
Reliability a criterion is reliable if all the sets that satisfy the criteria detect
the same error.
Validity a criterion is valid if for any error in the program there is some set
satisfying the criteria that will reveal the error. The fundamental theorem of
testing is that if a testing criterion is valid and reliable, if a set satisfying
criteria succeeds then the program contains no errors.
(97)
7.IMPLEMENTATION
(98)
IMPLEMENTATION
Object Oriented
Simple
Platform Dependent
Mid-level programming language
Structured programming language
Rich Library
Memory Management
Powerful & Fast
Pointers
Compiler based
Syntax based language
(99)
OBJECT ORIENTED PROGRAMMING LANGUAGE
(100)
FEATURES OF C++
Simple
C++ provides a structured approach wherein you can break the problem into
parts and design the solution modularly. It provides you a rich set of library
functions that you can use while implementing the solution.
If you have worked with C language, then moving to C++ would be a very
smooth transitioning. The syntax is almost similar with minute changes.
Platform Dependent
C++ has the ability to do both low-level & high-level programming. This is the
reason why C++ is known as a mid-level programming language. When we talk
about low-level programming, C++ is used to develop system applications such
as the kernel, driver, etc.
(101)
Structured programming language
In C++ programming, the code is modular with the help of functions, classes &
objects, and the modules are loosely coupled. Modular code is easy to
understand & modify. This makes C++ a structured programming language.
Rich Library
(102)
Memory Management
C++ supports dynamic memory allocation. You can free the allocated memory
at any time. Not only this C++ also provides dynamic memory management
techniques.
C++ is a fast language as compilation and execution time is less. Also, it has a
wide variety of data types, functions & operators.
Pointers
Pointers are variables that store the address of another variable. Pointer points to
the memory location of a variable. C++ supports pointer and provides solutions
to lots of problems that demand access to memory location.
Compiler based
C++ is a language that complies strongly with syntax. Language following rules
and regulations very strictly is known as tight syntax-based language. C, C++,
Java, .net are some of the examples.
(103)
MySQL Features
Easy to use
MySQL is easy to use. We have to get only the basic knowledge of SQL. We
can build and interact with MySQL by using only a few simple SQL statements.
It is secure
MySQL consists of a solid data security layer that protects sensitive data from
intruders. Also, passwords are encrypted in MySQL.
(104)
Free to download
MySQL is free to use so that we can download it from MySQL official website
without any cost.
It is scalable
Speed
MySQL is considered one of the very fast database languages, backed by a large
number of the benchmark test.
High Flexibility
(105)
Allows roll-back
Memory efficiency
Its efficiency is high because it has a very low memory leakage problem.
High Performance
MySQL is faster, more reliable, and cheaper because of its unique storage
engine architecture. It provides very high-performance results in comparison to
other databases without losing an essential functionality of the software. It has
fast loading utilities because of the different cache memory.
High Productivity
MySQL uses Triggers, Stored procedures, and views that allow the developer to
give higher productivity.
Platform Independent
It can download, install, and execute on most of the available operating systems.
Partitioning
This feature improves the performance and provides fast management of the
large database.
(106)
GUI Support
MySQL provides a unified visual database graphical user interface tool named
"MySQL Workbench" to work with database architects, developers, and
Database Administrators. MySQL Workbench provides SQL development, data
modeling, data migration, and comprehensive administration tools for server
configuration, user administration, backup, and many more. MySQL has a fully
GUI supports from MySQL Server version 5.6 and higher.
MySQL version 8.0 provides support for dual passwords: one is the current
password, and another is a secondary password, which allows us to transition to
the new password.
(107)
7.2 VALIDATION CHECKS :
1) All the fields such as employee, new entry, and salary etc. are validated and
do not take invalid values.
2) Each form for employee, salary, address cannot accept blank value fields.
3) Avoiding errors in data.
4) Controlling amount of input.
5) Integration of all the modules/forms in the system.
6) Preparation of the possible test data with all the validation checks.
7) Actual testing done manually.
8) Recording of all the reproduced errors.
9) Modifications done for the errors found during testing.
10) Prepared the test result scripts after rectification of the errors.
11) Functionality of the entire module/forms.
12) Validations for user input.
13) Checking of the coding standards to be maintained during coding.
14) Testing the module with all the possible test data.
15) Testing of the functionality involving all types of calculations etc.
16) Commenting standard in the source files.
(108)
7.3INSTALLATION :
Installation is the process of making hardware and/or software ready for use.
Obviously, different systems require different types of installations. While
certain installations are simple and straightforward and can be performed by
non-professionals, others are more complex and time-consuming and may
require the involvement of specialists.
Installation can be categorized into two broad categories: physical and virtual.
Physical installation pertains to installing physical equipment such as computer
hard drives, cables, modems and so on, while virtual installation refers to
installation of software. Much physical machine installation requires specific
expertise. Similarly, there are software installations that can be done only by
experts, whereas other installations are as simple and straightforward as the
wizard-based installations commonly found with consumer software and
frequently available on websites to be downloaded. Different types of software
installations include Windows Installer installation, web-based software
installation and single exe software installation.
(109)
8.CONCLUSION
(110)
CONCLUSION
A manual payroll system requires computing the time clock data by hand; this
increases the likelihood of mistakes. The automated time-keeping system allows
the employer to import time clock data into payroll software. Specifically, the
employee uses a swipe card or badge, or the hand print or fingerprint method, to
clock in and out. Once the entries are transported into the payroll software, the
software computes the time worked. All the payroll staff member has to do is
ensure the time is transported appropriately and make the necessary
edits .Successfully, the system has been designed in response to the system
analysis. All possible error in the program have been eliminated. Necessary
validation techniques have been used and normal, abnormal and extremely data
was used to test the system.
However, doing this project has been a good boost to our confidence as the
future IT member of our global village. Payroll seems simple at its core, but
becomes complicated because of the various deductions that come into play.
Employers must withhold taxes from each paycheck and make sure accurate
(111)
funds are paid to the correct government agency. Employers may also be
responsible for deducting and paying premiums for insurance and depositing
funds into retirement accounts or to selected charities. Payroll processing duties
can create a huge burden and unwanted stress for small business owners and can
be overwhelming for large businesses.
A missed deadline or incorrect filing of taxes can result in fines or jail time. To
avoid these issues, small, middle-sized, and large businesses can all benefit
from using payroll systems .For small businesses, payroll system software can
mitigate errors in the payroll process and reduce the amount of effort involved
in calculating employee hours, wages, and tax withholdings. Payroll software is
easy to use and often times very affordable for small businesses. In some cases,
small businesses may save money by using payroll processing software instead
of other alternatives..
However, doing this project has been a good boost to our confidence as the
future IT member of our global village. Payroll seems simple at its core, but
becomes complicated because of the various deductions that come into play.
Payroll seems simple at its core, but becomes complicated because of the
various deductions that come into play. Employers must withhold taxes from
each paycheck and make sure accurate funds are paid to the correct government
agency.
8.1LIMITATION OF PROJECT :
Though we have tried our level best to make our system flawless and user
friendly by using the modern technologies, some minor functional and design
inconsistencies exist in our system due to time constraint, design of prototype
and cost constraints. The limitations of our system are:
(112)
But, that information needs to be archived continuously. And, this daily
process needs the help of a human hand. In a busy operation, setting aside
this particular slice of time in a workday can become a slight hassle.
2. Limited Access - In most instances, payroll software is loaded onto one
computer and that data can only be accessed from that machine. This can be
a hassle, especially if the payroll processing computer goes off the rails. The
result could be that whole payroll process goes with it, which can cause
headaches throughout the business.
3. Added Weight to Overhead - Implementing payroll software may also call
for a fulltime employee to take on the responsibilities of doing payroll in-
house. With an added employee comes the cost of an additional salary and
benefits. Also to be considered is the cost of technical support when the
inevitable software glitches occur.
4. Risk of Under withholding - The Internal Revenue Service notes that some
payroll software systems are unable to distinguish additional voluntary
withholding amounts from regular withholding when calculating catch-up
withholding for the current tax year. This kind of glitch does not apply to all
payroll software programs, but if not identified or accounted for, a business
can be fined for underwith holding.
5. Security Concerns - Since online payroll services rely on a third party to
process and store payroll information, sensitive information about employees
and the hours that they work doesn’t remain solely within the walls of one’s
workplace. In an ideal world, all online payroll services would remain very
secure and be guaranteed against leaks, but this may not always be the case.
Before working with a vendor, be sure to ask about security measures.
6. Potential for Extra Charges - If you’re not converting all your HR
processes to an online platform, you may find yourself paying for some
unnecessary services. Some payroll vendors package their offerings,
potentially giving you access to services currently handled by other third
(113)
parties or that you manage in house using other systems. There may also be
extra charges for things like report generation or support services.
Payroll processing software programs have their limitations, but they also have
their benefits. The technology pros as WiseGeek.org point out the fact that
payroll processing software helps to streamline the entire payroll process for a
business. What's more, using payroll processing software enables a company to
not only calculate wages due to employees, but also helps a business organize
and archive important records. Even such things as reimbursing employees for
expenses may be easier when payroll software is used.
8.2DIFFICULTIES ENCOUNTERED
(114)
performance and departmental performance thus all frameworks default back to
money related estimations.
(115)
8.3FUTURE ENHANCEMENT :
Our system is developed based on demand of user’s satisfaction and facilities.
In our system we have used the modern web technologies to make our system
fast, convenient and efficient for all of the personnel mentioned. Due to time
and cost constraint it was not possible to fulfill all requirements and
functionalities those were planned. But in future these planned functionalities
and more improvement will be possible to pursue. The functionalities to be
implemented are :
(116)
Paperless Payroll :
Sometimes distributing the payroll process can cause difficulties with actually
delivering paychecks to employees. Many employees electronically transfer
funds directly into their bank accounts, but some employees do not have bank
accounts. According to some estimates, 65 percent of the population are "un-
banked" workers, some of whom opt for paper checks and often pay high
cashing fees as a result. Recently, as an alternative to checks, payroll cards
(sometimes called stored-value-cards) have helped to alleviate some of the
problems for these "un-banked" workers. Funds are electronically transferred to
an employee's payroll card account instead of a checking account. Fees and
rules for these cards vary widely, making it difficult to know which card offers
the most value for an organization and its employees. As with most
technologies, this industry will also be transformed in coming years. Smart-card
technologycards with electronic chips embedded in them-will offer more value
to the card holder but also a greater threat to personal information. For example,
the credit industry is already examining how to use payment, account balance
and purchasing habit information to learn more about the card holder. This
information may help supplement poor credit score information with "living"
financial information.
(117)
paperwork, managers can simply open their payroll console and initiate a salary
increase process. They can select the employee from a company list and
electronically fill out the appropriate forms, based on the current information in
the payroll system.Managers fill in the new salary field and attach the most
recent employee performance review documents to the workflow record.
(118)
9.BIBLIOGRAPHY
&
REFERENCES
(119)
BIBLIOGRAPHY AND REFERENCES
9.1REFERENCE BOOKS :
2) C++ Primer
5) SQL Programming
9.2OTHER REFERENCES :
1) www.123seminarsonly.com
2) www.freeprojectz.com
3) www.lnu.diva-portal.org
4) www.slideshare.net
5) www.irjet.net
6) www.bestengineeringprojects.com
(120)