You are on page 1of 32

PAYROLL SYSTEM Reg.

No:30306104081

PAYROLL SYSTEM

AIM:
To develop software for PAYROLL SYSTEM with various functional and non-
functional part of design namely,
• Problem analysis and requirement analysis
• Use case documentation
• UML diagram
• Test plan

PROBLEM DEFINITION:

The Pay Roll System is an automatic system using which the employee can login,
in the mean time the Employee details and the working hours of the Employee are
stored in the database by the ProjectDB. The Pay Roll System is a new system that
replaces the current manual process of calculating the salary. The Employee salary is
calculated based on the type payment selected by the Employee and the number of
hours worked by the Employee.

OBJECTIVE OF THE APPLICATION:

The ultimate goal of this project is to develop database software that enables
employee to login, to enter his/her details and the accountant calculates salary and
updates the database.
PAYROLL SYSTEM Reg.No:30306104081

SIGNIFICANCE OF THE APPLICATION:

The significance of the project includes the following key features

• The employee can login and to edit/view his profile.


• The System Calendar maintains employee details in the Database.
• The System Calendar calculates the employee salary based on his/her attendance and
the payment type selected by the Employee.
• The System Calendar creates the admin report.
• Edit/View Employee details.

Access to database can be setup on username / password basis with multiple users and
privileges

FUNCTIONAL REQUIREMENTS:

Login The Employee login by entering valid username


and password, to view his/her profile.

The Employee has to select the type of payment


Payment Type in which type the salary has to be calculated.

Time Card The working hours of the Employee is


calculated and it stored in the database by the
Project DB.
Salary Calculation The Salary of the Employee is calculated by the
System Calendar based on the number of hours
worked and the payment type selected by the
Employee.
Report Generation The report for the calculated salary is generated
and it is stored.
PAYROLL SYSTEM Reg.No:30306104081

USE CASE TEMPLATE:

Use Case ID: 1

Use Case Name: Employee Login

Created By: Sajeetharan S Last Updated By:

Date Created: September 30 Date Last Updated:

Actors: Employee

Description: The Employee can log into their account by giving the username and password.

Trigger Employee wants to login.

Preconditions: In this case there is no precondition.

Post conditions: • If valid user, he/she can view/edit their profile.


• If invalid user, alert message is displayed.

Normal Flow • Username and Password is requested from the Employee.


• Both are checked in the database.
• If matches, valid user. Allowed to access his/her profile.
• Else invalid user, Alert message is displayed.

Alternative Flows: If the Employee is not logged in , the system should exit.

Exceptions: 1.0 Invalid Password.


If the password is invalid, display Alert message.

Includes: None

Priority: High

Frequency of Use: Depends on the number of Employee in the organisation.

Business Rules: If anyone wants to use the system, definitely they should login.

Special Requirements: Employee can view their profile.

Assumptions: Employee enters the valid id and password.


PAYROLL SYSTEM Reg.No:30306104081

Use Case ID: 2

Use Case Name: Maintain Time Card

Created By: Sajeetharan S Last Updated


By:

Date Created: September 30 Date Last


Updated:

Actors: Employee

Description: The working hours of the Employee are stored in the Database by the ProjectDB so that it can
be used during salary calculation.

Trigger To update the database.

Preconditions: Check whether the Employee/Administrator is valid person or not.

Post conditions: • The number of hours worked by the Employee is calculated and it is stored in
database.

Normal Flow • The time elapsed since the Employee enters the organisation till he/she leaves it is
calculated.
• The calculated time is stored in the database by the ProjectDB.

Alternative Flows: None

Exceptions: If the Employee is working for punishment, that working time should not be calculated.

Includes: None

Priority: High

Frequency of Use: Depends on the number of Employees enters the organisation.

Business Rules: None

Special Requirements: Some special methods have to be used to maintain time card, if Employee works extra time.

Assumptions: None
PAYROLL SYSTEM Reg.No:30306104081

UseU Use Case ID: 3

Use Case Name: Payment Selection

Created By: Sajeetharan S Last Updated By:

Date reated: September 30,2009 Date Last Updated:

Actors: Employee, Bank System

Description: The Employee can select the type of payment of their wish based on which the salary is
calculated.

Trigger To update the Bank System database by the type of Payment System selected by the
Employee.

Preconditions: Check whether the Employee is valid or not.

Post conditions: • The Employee payment type is updated in database if he/she enters valid type.

• Else, not updated.

Normal Flow • The Employee selects the type of payment of their wish.
• The Database Admin checks whether it is valid payment type or not.
• If valid, then the type is reported to the bank System. Then the Database
Administrator updates the database.

• Else, the Alert Message is displayed to the Employee to enter valid type.

Alternative Flows: If the Employee selects the type of payment, the type should not be changed.

Exceptions: 3.0 Invalid Payment type


If the Employee enters invalid type, system displays error message.

Includes: None

Priority: High

Frequency of Use: Depends on the number of Employees in the organisation.

Business Rules: The salary should be calculated based on the type of salary selected by Employee.

Special Requirements: None

Assumptions: None
PAYROLL SYSTEM Reg.No:30306104081

Use Case ID: 4

Use Case Name: Salary Calculation

Created By: Sajeetharan S Last Updated


By:

Date Created: September Date Last


30, 2009 Updated:

Actors: Employee, System Calendar, Bank System, ProjectDB

Description: The salary of the Employee is calculated and stored.

Trigger To run the Pay Roll system during the last day of the month.

Preconditions: It should run during the last day of the month.

Post conditions: • The salary is to be displayed to the Employee.


• The salary is to be stored in the Database.

Normal Flow • The working hour of the Employee is retrieved from database which is stored
using Time Card.
• The payment type of the Employee is retrieved from Bank System.
• The salary of the Employee is calculated using the number of hours worked and
the payment type.
• The salary is displayed to the Employee and is stored in the database of the Bank
System.

Alternative Flows: None

Exceptions: If the Employee leaves the company during middle of the month, the system should
calculate salary at that time.

Includes: None

Priority: High

Frequency of Use: Used frequently once in a month.

Business Rules: None

Special Requirements: Check whether the Employee is currently working or not.

Assumptions: None
PAYROLL SYSTEM Reg.No:30306104081
Use Case ID: 5

Use Case Name: Report Generation

Created By: Sajeetharan S Last Updated By:

Date Created: September 30, 2009 Date Last Updated:

Actors: Employee, System Calendar

Description: The System Calendar generates the Report.

Trigger To generate the report and to display it to the Employee and store it in the database.

Preconditions: No preconditions are required.

Post conditions: • The Report is to be displayed to the Employee.


• The Report is to be stored in the Database.

Normal Flow • The Employee details and the salary calculated for the Employee is taken
from the database through ProjectDB.
• With this, the report is generated for the Employee.
• The report is displayed to the Employee.
• The same is stored in database by the ProjectDB.

Alternative Flows: None

Exceptions: If Employee details is not available during report generation, the DBA should refer
any other records and generate the record.

Includes: None

Priority: High

Frequency of Use: Used frequently once in a month.

Business Rules: None

Special Requirements: None

Assumptions: All the Employee details are available in the database.

USECASE DIAGRAM:
PAYROLL SYSTEM Reg.No:30306104081

< < e xte n d > >

S e le c t P a ym e n t
E m p l o ye e B a n k S ys te m

T im e c a rd

< < in c lu d e > >


< < in c lu d e > >
C o m m is s io n e d
E m p l o ye e

P ro je c t D B
P u rc h a s e O r d e r L o g in

T h ir d P a rty
M a in ta in e m p l o ye e i n fo

< < e xte n d > >

C r e a te a d m i n re p o r t

< < in c lu d e > >


R u n p a yro ll
S ys te m C a le n d a r

SEQUENCE DIAGRAM:
PAYROLL SYSTEM Reg.No:30306104081

LOGIN

:Employee :Project Admin : Project DB

1: Login

2: Employee Info

3:Maintain Time card

4: Create admin report

5:Salary Calculated Successfully

INCREASE SALARY
PAYROLL SYSTEM Reg.No:30306104081

:Commissioned : Third Party


Employee

1: Maintain Purchase order

2: Salary increased successfully

SALARY CALCULATION
PAYROLL SYSTEM Reg.No:30306104081

:Employee : System : Bank system


calendar

1: Select payment

2:Run Payroll

3: Salary obtained successfully

COLLABORATION DIAGRAM:
PAYROLL SYSTEM Reg.No:30306104081

LOGIN

:Employ
ee
: System
calendar

1: 1: Select payment

3: 3: Salary obtained successfully 2: 2:Run Payroll

: Bank
system
PAYROLL SYSTEM Reg.No:30306104081
INCREASE SALARY

1: 1: Maintain Purchas e order


:Commissioned : Third
Employee Party
2: 2: Salary increas ed s ucces s fully

SALARY CALCULATION

2:

:Employ :Project
ee Admin

3: 2: Employee Info
4: 3:Maintain Time card

5: 4: Create admin report


6: 5:Salary Calculated Successfully

: Project
DB
PAYROLL SYSTEM Reg.No:30306104081
ACTIVITY DIAGRAM:

LOGIN

Begin

Login

Enter username
and password

Valid Login No Invalid Login


Yes

login details
displayed

End
PAYROLL SYSTEM Reg.No:30306104081

CALCULATE SALARY

Start

Maintain
Timecard

Hours W orked No Salary not


calculated

Yes

Salary
Calculated

Salary Details
displayed

End
PAYROLL SYSTEM Reg.No:30306104081

EMPLOYEE DETAILS

B e g in

M a in ta in
e m p lo y e e in fo

C re a t e a d m in Y es N o re p o rt
re p o rt c re a t e d

No

R e p o rt c re at e d

R e p o rt D e t a ils
D is p la y e d

E nd
PAYROLL SYSTEM Reg.No:30306104081
PAYMENT SELECTION

B e g in

S elec tion o f
p a y m e nt

P a y m ent No P a y m e nt no t
s e le c ted Y es s e le c ted

P a y m e n t S E lec tio n
d etails is d is play e d

E nd
PAYROLL SYSTEM Reg.No:30306104081
RUN PAYROLL

Begin

Las t W ork ing


Day of m onth

Run P ay roll

Y es P ay roll runned
s uc c es s fully

No

Not runned

Pay roll run details


dis play ed

E nd
PAYROLL SYSTEM Reg.No:30306104081

STATE CHART DIAGRAM:

B e g in

V ie w th e d e a ils E n t e r t h e d e ta ils N o .o f h o u rs w o rk e d
L o g in P a y ro ll A d m in T im e c a rd
A d m in R e p o rt

S e le c t th e p a ym e n t typ e
A n o th e r typ e o f e m p lo ye e

C o m m is s io S y s te m B ank sy s S e le c t
ned E m p C a le n d a r P aym ent
R u n P a y ro ll
C h o ic e o f p a ym e n t

N u m b e r p u rc h a s e d

S to r e th e d e ta ils in d b
P u rc h a s e T h ird P a rty P ro je c t D B C o m p l e te
o rd e r

M a in t a in o rd e r C o m p l e te th e p ro c e s s
PAYROLL SYSTEM Reg.No:30306104081
CLASS DIAGRAM:

+* +1

+1
R un Pa yroll Ban k

D ay : D ate Acct.n o:ch a r


Am o u n t:int
La s t_w o rk _ da y()
Pa ym en t()
+*

+*

Em p lo yee
C alen dar d is play
+1 N am e :s trin g
D ate:d ate Id:s trin g
Mon th :s trin g Ad d res s :s tring
Ye ar:in t
H o urs _ w orked ()
D is pla y_d ate() Adm in Paym e n t_ s e le ction()

Em p lo ye e_ in fo ()
C alculate _s ala ry()
R e p o rt()

Report Details

Em p_ n am e :s trin g Em p_ na m e :s tring
Id :s tring Salary:in t
Sa la ry:int
Vie w _ de ta ils ()
Em p_ n am e ()
Id ()
R ep o rt_ cre ation()
PAYROLL SYSTEM Reg.No:30306104081

COMPONENT DIAGRAM:

h o u r s w o r k e d .h h o u rs w o r k e d .ja v a p a ym e n t s e l e c tio np a.hym e n t s e l e c tio n .d l l

a d m i n s e r ve r.h a d m i n s e r ve r.d l l

a d m in s e rve r. e x e

r e p o r t c r e a ti o n .hr e p o r t c r e a tio n .j a va c a le n d a r d i s p l a y.h c a l e n d a r d i s p la y.ja va


PAYROLL SYSTEM Reg.No:30306104081

DEPLOYMENT DIAGRAM:

Payroll admin Bank admin

System
Calender

Client2
Client 1 (Comm-Emp)
(Employee)
PAYROLL SYSTEM Reg.No:30306104081

APPENDIX:

Details.h

#ifndef Details_h
#define Details_h 1
#include "Admin.h"
class Details : public Admin //## Inherits: <unnamed>%4AC315C103A9
{
public:
Details();
Details(const Details &right);
~Details();
Details & operator=(const Details &right);
int operator==(const Details &right) const;
int operator!=(const Details &right) const;
protected:
const void get_Emp_nameXstring () const;
void set_Emp_nameXstring (void value);
const void get_SalaryXint () const;
void set_SalaryXint (void value);
private:
void View_details ();
private:
void Emp_nameXstring;
void SalaryXint;
};
inline const void Details::get_Emp_nameXstring () const
{
return Emp_nameXstring;
}
inline void Details::set_Emp_nameXstring (void value)
{
Emp_nameXstring = value;
}
inline const void Details::get_SalaryXint () const
{
return SalaryXint;
}
inline void Details::set_SalaryXint (void value)
{
SalaryXint = value;
}
#endif
PAYROLL SYSTEM Reg.No:30306104081

Employee.h

#ifndef Bank_h
#define Bank_h 1
#include "Employee.h"
class Bank
{
public:
Bank();
Bank(const Bank &right);
~Bank();
Bank & operator=(const Bank &right);
int operator==(const Bank &right) const;
int operator!=(const Bank &right) const;
const Employee * get_the_Employee () const;
void set_the_Employee (Employee * value);
protected:
const void get_AcctXnoXchar () const;
void set_AcctXnoXchar (void value);
const void get_AmountXint () const;
void set_AmountXint (void value);
private:
void Payment ();
private:
void AcctXnoXchar;
void AmountXint;
Employee *the_Employee;
};
inline const void Bank::get_AcctXnoXchar () const
{
return AcctXnoXchar;
}
inline void Bank::set_AcctXnoXchar (void value)
{
AcctXnoXchar = value;
}
inline const void Bank::get_AmountXint () const
{
return AmountXint;
}
inline void Bank::set_AmountXint (void value)
{
AmountXint = value;
}
inline const Employee * Bank::get_the_Employee () const
{
PAYROLL SYSTEM Reg.No:30306104081

return the_Employee;
}
inline void Employee::set_the_Employee (Employee * value)
{
the_Employee = value;
}
#endif

Admin.h

#ifndef Admin_h
#define Admin_h 1
#include "Calendar display.h"
#include "Employee.h"
class Admin : public Employee //## Inherits: <unnamed>%4AC3163100DA
{
public:
Admin();
Admin(const Admin &right);
~Admin();
Admin & operator=(const Admin &right);
int operator==(const Admin &right) const;
int operator!=(const Admin &right) const;
const Calendar_display * get_X () const;
void set_X (Calendar_display * value);
protected:
void Employee_info ();
void Calculate_salary ();
private:
private:
void Report ();
Calendar_display *X;
};
inline const Calendar_display * Admin::get_X () const
{
return X;
}
inline void Admin::set_X (Calendar_display * value)
{
X = value;
}
#endif
PAYROLL SYSTEM Reg.No:30306104081

Bank.h

#ifndef Bank_h
#define Bank_h 1
#include "Employee.h"
class Bank
{
public:
Bank();
Bank(const Bank &right);
~Bank();
Bank & operator=(const Bank &right);
int operator==(const Bank &right) const;
int operator!=(const Bank &right) const;
const Employee * get_the_Employee () const;
void set_the_Employee (Employee * value);
protected:
const void get_AcctXnoXchar () const;
void set_AcctXnoXchar (void value);
const void get_AmountXint () const;
void set_AmountXint (void value);
private:
void Payment ();
private:
void AcctXnoXchar;
void AmountXint;
Employee *the_Employee;
};
inline const void Bank::get_AcctXnoXchar () const
{
return AcctXnoXchar;
}
inline void Bank::set_AcctXnoXchar (void value)
{
AcctXnoXchar = value;
}
inline const void Bank::get_AmountXint () const
{
return AmountXint;
}
inline void Bank::set_AmountXint (void value)
{
AmountXint = value;
}
inline const Employee * Bank::get_the_Employee () const
PAYROLL SYSTEM Reg.No:30306104081

{
return the_Employee
}
inline void Bank::set_the_Employee (Employee * value)
{
the_Employee = value;
}
#endif

Runpayroll.h

#ifndef Run_Payroll_h
#define Run_Payroll_h 1
#include "Bank.h"
#include "Calendar display.h"
class Run_Payroll : public Bank
{
public:
Run_Payroll();
Run_Payroll(const Run_Payroll &right);
~Run_Payroll();
Run_Payroll & operator=(const Run_Payroll &right);
int operator==(const Run_Payroll &right) const;
int operator!=(const Run_Payroll &right) const;
const Bank * get_N1 () const;
void set_N1 (Bank * value);
protected:
private:
private:
void Last_work__day ()
const Date get_Day () const;
void set_Day (Date value);
Date Day;
Bank *N1;
};
inline const Date Run_Payroll::get_Day () const
{
return Day;
}
inline void Run_Payroll::set_Day (Date value)
{
Day = value;
}
PAYROLL SYSTEM Reg.No:30306104081

inline const Bank * Run_Payroll::get_N1 () const


{
return N1;
}
inline void Run_Payroll::set_N1 (Bank * value)
{
N1 = value;
}
#endif

Calendar.h

#ifndef Calendar_display_h
#define Calendar_display_h 1
#include "Admin.h"
#include "Bank.h"
class Calendar_display : public Bank
{
public:
Calendar_display();
Calendar_display(const Calendar_display &right);
~Calendar_display();
Calendar_display & operator=(const Calendar_display &right);
int operator==(const Calendar_display &right) const;
int operator!=(const Calendar_display &right) const;
const Admin * get_the_Admin () const;
void set_the_Admin (Admin * value);
protected:
private:
private:
void Display_date ();
const void get_DateXdate () const;
void set_DateXdate (void value);
const void get_MonthXstring () const;
void set_MonthXstring (void value);
const void get_YearXint () const;
void set_YearXint (void value);
void DateXdate;
void MonthXstring;
void YearXint;
Admin *the_Admin;
};
inline const void Calendar_display::get_DateXdate () const
{
return DateXdate;
PAYROLL SYSTEM Reg.No:30306104081

}
inline void Calendar_display::set_DateXdate (void value)
{
DateXdate = value;
}
inline const void Calendar_display::get_MonthXstring () const
{
return MonthXstring;
}
inline void Calendar_display::set_MonthXstring (void value)
{
MonthXstring = value;
}
inline const void Calendar_display::get_YearXint () const
{
return YearXint;
}
inline void Calendar_display::set_YearXint (void value)
{
YearXint = value;
}
inline const Admin * Calendar_display::get_the_Admin () const
{
return the_Admin;
}
inline void Calendar_display::set_the_Admin (Admin * value)
{
the_Admin = value;
}
#endif

Report.h

#ifndef Report_h
#define Report_h 1
#include "Admin.h"
class Report : public Admin //## Inherits: <unnamed>%4AC31933007D
{
public:
Report();
Report(const Report &right);
~Report();
Report & operator=(const Report &right);
int operator==(const Report &right) const;
int operator!=(const Report &right) const;
PAYROLL SYSTEM Reg.No:30306104081

protected:
const void get_Emp_nameXstring () const;
void set_Emp_nameXstring (void value);
const void get_IdXstring () const;
void set_IdXstring (void value);
const void get_SalaryXint () const;
void set_SalaryXint (void value);
private:
void Emp_name ();
void Id ();
private:
void Report_creation ();
void Emp_nameXstring;
void IdXstring;
void SalaryXint;
};
inline const void Report::get_Emp_nameXstring () const
{
return Emp_nameXstring;
}
inline void Report::set_Emp_nameXstring (void value)
{
Emp_nameXstring = value;
}
inline const void Report::get_IdXstring () const
{
return IdXstring;
}
inline void Report::set_IdXstring (void value)
{
IdXstring = value;
}
inline const void Report::get_SalaryXint () const
{
return SalaryXint;
}
inline void Report::set_SalaryXint (void value)
{
SalaryXint = value;
}
#endif
PAYROLL SYSTEM Reg.No:30306104081

TEST PLAN:

Overview
Test plan objectivesTo ensure that the Pay Roll system will:
- Function consistently and reliably in accordance with
current business operations.
- Meet or exceed user requirements and technical
specifications.
- Not adversely impact other systems or the existing
technology environment.
Testing Assumptions - Pay Roll system which is used to calculate the salary are
already implemented and tested and there is no direct
interaction between calculation of salary using Pay Roll
System and manual calculation process.
- Since all the operations are done automatically by the Pay
Roll System itself, there is no chance of salary calculation
error as in manual calculation.
- The Pay Roll system can be used for any level of
Employee in an organisation for calculating salary.

Risks & The following risks apply to the testing process and may impact
Contingencies either the proposed date of readiness for the deployment of online
reservation system, or the comprehensive level of testing that can
be performed in each of the Functional Units:
- The salary actually calculated by this system will be
wrong, if the Employee/Accountant enter wrong details in
the database.
- The system will become quickly outdated if the
organisation policy changes.
- The system will not be used to calculate salary during
middle of the month.
PAYROLL SYSTEM Reg.No:30306104081

RESULT:

Thus the Problem Analysis ,Requirement Analysis and various Use Case
scenarios ,UML diagrams, Test plans of Payroll System has been studied successfully.

You might also like