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.
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.
Payment Type
The Employee has to select the type of payment 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.
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.
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.
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.0Invalid 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
Use Case ID: 4
Use Case Name: Salary Calculation
Created By: Sajeetharan S Last Updated By:
Date Created: September
30, 2009
Date Last 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.
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.
C o m m is s io n e d E m p l o ye e T h ir d P a rty P u rc h a s e O rd e r M a in ta in e m p l o ye e i n fo C r e a te a d m i n re p o r t R u n p a yro ll B a n k S ys te m P ro je c t D B S ys te m C a le n d a r S e le c t P a ym e n t T im e c a rd L o g in E m p l o ye e < < in c lu d e > > < < in c lu d e > > < < in c lu d e > > < < e xte n d > > < < e xte n d > >
SEQUENCE DIAGRAM:
LOGIN
:Employee :Project Admin : Project DB
1: Login
2: Employee Info
3:Maintain Time card
5:Salary Calculated Successfully
4: Create admin report
:Commissioned Employee
: Third Party 1: Maintain Purchase order
2: Salary increased successfully
:Employee : System calendar
: Bank system 1: Select payment
2:Run Payroll
3: Salary obtained successfully
LOGIN :Employ ee : System calendar : Bank system 1: 1: Select payment
INCREASE SALARY
:Commissioned Employee
: Third Party
1: 1: Maintain Purchas e order
2: 2: Salary increas ed s ucces s fully
SALARY CALCULATION
:Employ ee :Project Admin : Project DB 2: 3: 2: Employee Info 4: 3:Maintain Time card6: 5:Salary Calculated Successfully
LOGIN
Begin Login Enter username and password Valid Login Yes Invalid Login No End login details displayedCALCULATE SALARY
Start
Maintain Timecard
Hours Worked Salary not
calculated No Salary Calculated Yes End Salary Details displayed
EMPLOYEE DETAILS
E n d B e g in M a in ta in e m p loy e e in fo C re at e a d m in rep o rt N o re p o rt c re a te d Y e s R e p o rt c re at e d N o R e p o rt D e t a ils D is p la y e dPAYMENT SELECTION
B e g in S elec tion of pay m ent P ay m ent s elec ted Y es P ay m ent not s elec ted N o E nd P ay m ent S E lec tionE nd Begin Last W orking Day of m onth Run P ayroll Payroll runned successfully Yes Not runned No
Payroll run details displayed
STATE CHART DIAGRAM:
B e g in L o g in P a y ro ll A d m in A d m in R e p o rt Tim e c a rd S e le c t P a y m e n t B a n k s y s S y s te m C a le n d a r C o m m is s io n e d E m p P u rc h a s e o rd e r Th ird P a rty P ro je c t D BVie 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
S e le c t th e p a ym e n t typ e C h o ic e o f p a ym e n t R u n P a y ro ll An o th e r typ e o f e m p lo ye e N u m b e r p u rc h a s e d M a in ta in o rd e r S to r e th e d e ta ils in d b C o m p le te C o m p l e te th e p ro c e s s
Report
Em p_nam e:s tring Id:s tring Salary:int Em p_nam e() Id() Report_creation() Run Payroll D ay : D ate Las t_w ork _day()
C alendar dis play D ate:date Month:s tring Year:int D is play_date() Admin Em ployee_info() Calculate_s alary() Report() +* +1 Bank Acct.no:char Am ount:int Paym ent() +1 +* Details
Em p_nam e:s tring Salary:int View _details () Em ployee N am e:s tring Id:s tring Addres s :s tring H ours _worked() Paym ent_s election()
+1
COMPONENT DIAGRAM:
h o u rs w o rk e d .h h o u rs w o rk e d .ja va p a ym e n t s e l e c tio n .hp a ym e n t s e le c tio n .d ll
a d m in s e rve r. e x e
a d m in s e rve r.d l l a d m i n s e rve r.h
DEPLOYMENT DIAGRAM:
Payroll admin Bank admin
Client2 (Comm-Emp) Client 1 (Employee) System Calender
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; }
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 {
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; }
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; }
{
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; }
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 {
}
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;
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; }
TEST PLAN:
Overview
Test plan objectives To 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 &
Contingencies The following risks apply to the testing process and may impact 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.
RESULT:
Thus the Problem Analysis ,Requirement Analysis and various Use Case scenarios ,UML diagrams, Test plans of Payroll System has been studied successfully.