Вы находитесь на странице: 1из 68

CHAPTER ONE 1.

0 INTRODUCTION

1.1 BACKGROUND OF STUDY


Prompt payment of staff salaries by management of an organization boosts the morale of staffs and enhances productivity. Manual preparation of staffs salaries is often associated with lots of problems, which often time disrupt the morale of workers. The problems ranges from arithmetic error in computation, delay in payment, underpayment or overpayment and so on. In this project work, automated system shall be developed which shall eliminate all the problems associated with the manual process. The most common method of keeping the financial records of a company was manually. A bookkeeper kept the journals, the accounts receivable, the accounts payable, payroll and the ledgers in his best possible penmanship. In later years, an accounting machine, which was capable of performing normal bookkeeping functions, such as tabulating in vertical columns, performing arithmetic functions, and typing horizontal rows was used. The billing machine, which was designed to typewrite names, addresses, and descriptions, to multiply, to compute discounts, and to add net total, posting the requisite data to the proper accounts, and so to prepare a customers bill automatically once the operator has entered the necessary information, was used. Early accounting machines were marvels of mechanical complexity, often combining a typewriter and various kinds of calculator elements. The refinements in speed and capacity made possible by advances in electronics and operating complexity of these machines. Many of the newer generations of accounting machines are operated by a computer to which they are

permanently connected. Because of the minute by minute change in finances, accurate record keeping is critical. Computerizing a businesss general ledger, payroll, and other accounting tasks increases office efficiency. With the advent of computerization in accounting, Electronic spreadsheets were used to compute payroll and perform other accounting routines in organizations. Electronic spreadsheets allow you to do anything that you would normally do with a calculator, pencil and columnar scratch pad. Spreadsheets were primarily designed for managers who in the process of planning must do what if calculations and due to their flexibility; electronic spreadsheets have found their way into businesses. It takes its name from the accountants spreadsheeta sheet of paper with rules for rows and columnson which such work was usually done. Spreadsheet programs are much faster, more accurate, and easier to use than traditional accounting techniques. An example of electronic spreadsheet is Microsoft Excel. Early programs such as VisiCalc provided 254 rows and 63 columns for entering data and formulas for calculations. VisiCalc was introduced by Robert Frankston, a young computer programmer, and Dan Bricklin, a Harvard Business School student who was looking for a way to use the power of a computer to simplify complex time-consuming financial analyses. VisiCalc proved so useful in such applications that it provided an entry for personal computers into the business world. In 1980, the Sorcim Corporation introduced SuperCalc, a similar spreadsheet program for personal computers using the CPM operating system. Some modern programs for computers with large memories provide thousands of rows and hundreds of columns.

A new generation of computer software for business began with integrated spreadsheet programs, which can be used to prepare spreadsheets, create graphs, and manage data. In such programs, for example, it is easy to display spreadsheet data in the form of a graph or to transfer data from a data base to a spreadsheet. One of the first such programs was Lotus 1-2-3, an immediate success following its introduction in 1983.

1.2 STATEMENT OF RESEARCH PROBLEM


Preparation of payroll manually as earlier said is a cumbersome and boring task encountered by the account personnel in the account department of Kosofe Local Government due to the calculations involved and its repetitive nature. After an extensive interview with the account personnel on the existing payroll system, I discovered the following problems within the system: Calculating salaries through manual operation is burdensome and stressful. Errors such as transposition of figures in the journal Overpayment/Underpayment of salaries Delay in payment of staff salaries because too much time is spent in preparation of the payroll. The use of paper to keep pay details about each employee which results in too much paper work. There is less security in the manual system.

1.3 AIMS AND OBJECTIVES


The aim and objective of the project is to primarily automate the existing system. The secondary aim is to: offer access control to the payroll system; avoid errors in the preparation of the payroll; ensure prompt payment of accurate salaries; reduce the administration time and overhead of personnel in the account section; reduce the use of paper in record keeping; keep records of employees secure; make necessary information available to employees; offer update and processing control to the payroll system; and improve the working efficiency of the employees.

1.4 RESEARCH METHODOLOGY


This project work will be implemented in Java programming language. Microsoft Access will be used to keep the database of the organization and employees biodata.Unified Modeling Language (UML) will be used to model diagrams.

1.5 SIGNIFICANCE OF THE STUDY


Organizations which have very few employees may calculate payroll manually and find it less cumbersome and accurate but larger business organizations find it boring and cumbersome going through the same process due to the required record keeping and repetitive nature of the calculations involved in payroll.

A public sector (Kosofe Local Government) has been chosen as the litmus test for this project work because it is one of the largest employers of labor and it has been discovered that calculating the payroll of large organizations by manual process can be more prone to errors, inaccurate and burdensome. Also, it has been discovered that the development and use of an application is more cost effective than the manual system. Therefore a secured application that will improve on the way employees are being paid shall be developed for the Local Government.

1.6 SCOPE /LIMITATION OF STUDY


The scope of the study is limited to only computerization of payroll system of Kosofe Local Government and the software developed will run on stand alone system.

CHAPTER TWO 2.0 LITERATURE REVIEW

2.1 MEANING AND PURPOSE OF PAYROLL


Payroll according to David Weaver et al (1998) is referred to as the total earnings of all employees for a certain pay period. It is one of a series of accounting transactions dealing with the process of paying employees for services rendered, after processing of the various requirements for withholding of money from the employee for payment of payroll taxes, insurance premiums, employee benefits and other deductions

(Payroll,Wikipedia the free encyclopedia.htm,2006). Payroll involves the calculation of amounts due the employee, such as hourly wages, a salary consisting of a certain amount per calendar period, or pay to salespersons on commission. In addition to these payments, there are often computed amounts of paid vacation time and accrued sick leave which have been used or are available for use. All of these monies credited to the employee are usually referred to as gross pay. From these amounts that are credited to the employee, various debits are taken as withholding, the most significant being income tax, then other taxes such as security. There may also be additional deductions for health insurance, union dues, pension plan contributions, repayment of prior salary, vacation or sick leave overpayments made in error and other deductions. The amount left after deductions from gross pay is generally the amount given in the employee's pay envelope, either as cash or a cheque. This amount is known as net pay. If the employee has their net pay deposited to their bank account (through a process known as direct deposit) then the employee may simply receive a pay stub indicating this. 6

The purpose of payroll is to calculate pay due employees, to print paychecks and to maintain cumulative earnings records of all employees. Generally, there are three main computations in the payroll namely: Gross Earnings Deductions Net Pay.

2.1.1 Computation of Payroll Earnings


The amount an employee earns is known as the gross earnings. Various plans such as the salary plan, hourly rate plan, incentive pay plan, are used to determine an employees gross earnings. A payroll deduction is an amount subtracted from gross earnings. Payroll deductions include deductions required by law, such as the federal income tax, state income tax, and social security tax. They may also include voluntary deductions, such as the life insurance and hospitalization insurance premiums. In addition, some union contracts call for union deductions such as initiation fees and dues to be withheld from the employees earnings. The remainder after subtracting all deductions is known as net pay. Net pay is the amount actually given to the employee and it is commonly referred to as the takehome pay.

Gross Wages Less: Deductions Taxes Union Dues Loan Total Deductions Net Pay **** **** ****

****

- **** ****

2.1.2 The Payroll Process


According to David H.Weaver et al (1998), preparing the payroll involves the following steps: 1. Journalizing the payroll 2. Posting to the employee earnings records 3. Posting to the general ledger accounts 4. Recording and posting payroll taxes 5. Recording and posting payment of the payroll.

1. Journalizing the Payroll


The payroll journal is a special journal used to record payroll data for each pay period. The payroll data for each pay period for all employees is recorded in the payroll journal.

After the data for each employee is entered in the payroll journal, the payroll is then proved by adding and subtracting the columns.

2. Posting to the Employee Earnings Records


After the payroll journal is totaled and proved, the payroll information from the payroll journal are posted to the employee earnings records. An employee earnings record shows the details of an employees earnings and deductions for the year.

3. Posting to the General Ledger Account


The totals of the payroll journal provide the data for posting the payroll to the ledger account.

4. Recording and Posting Payroll Taxes


The federal and state laws require employees as well as employers to pay payroll taxes. The payroll taxes also posted in the general ledger.

5. Recording a Payment of the Payroll


The records of salaries and wages that an employer must keep are called payroll records. These records must provide several types of payroll data, including the following: The amount of wages and salaries paid to the employees The amount deducted from employees earnings The classification of wage and salary expenses The payroll taxes owed by the employer and the employees to the government agencies. When salaries are paid, the total amount of all the payroll cheques is entered in the cash payments journal. The amounts are then posted from the journal to the ledger account.

2.1.3 Methods of Paying Employees


The method for paying employees depends on whether an organization chooses to pay their employees by cash, bank transfer, or cheque. Paying by cash involve the payroll being paid in cash. Some organizations pay their employees by bank transfer. A bank transfer is a method of transferring funds from one account to one or more other accounts. In this method, the employer gives the bank a cheque for the total net pay and a list showing the net pay for each employee. Paying by cheque provides the employer with cancelled checks as proof that the employees have been paid. It also avoids having a large amount of cash on hand on paydays and sorting the cash into individual pay envelops. Some employers use a voucher cheque for paying its employees. A voucher cheque consists of two parts, one of which is a cheque. The lower part of voucher cheque is a regular cheque. The upper (or voucher part) is the employee pay statement and is kept by the employee as a record of gross earnings, deductions and net pay for the pay period.

2.2 COMPUTERIZED PAYROLL SYSTEM


Computerizing a payroll system can be beneficial to an organization because it reduces time required for payroll work since payroll work requires performing wide range of activities that involves a great deal of time in recording information, preparing forms, and making calculations. A computerized payroll calculates and tracks employee salaries, wages, bonuses, tax withholdings, and deductions. It prints employee paychecks,

10

provides reports to better manage employee pay records, and generates complete weekly, monthly, quarterly, and annual payroll tax-related forms and reports. Computerized payroll can assure business accurately withholds taxes from employees and pays mandatory fees such as Workers Compensation, once the initial information is input into the system. It is also used in automating and providing timely and accurate payroll processing for all types of employees. The computerized payroll is designed to process all types of payroll transactions for the purpose of computing and paying employees hence, computerization makes generating payroll a much simpler and quicker process than if trying to perform these duties manually.

2.2.1 Functions of Computerize Payroll


Some of the functions commonly handled by payroll software include: Pay employees for work performed Print payroll checks. Provide a structured system of general guidelines for your organization, including employee pay structure, pay frequency, and overtime definitions Distribute wages and salaries to specific general ledger accounts. Store relevant information on each employee, such as contact information, start date, and wage and payment history.

2.2.2 The Advantages of Computerized Payroll


Some of the advantages of payroll system are undoubted speed and accuracy. Computerized Payroll ensures accurate payment of employees pay and government taxes. 11

It also holds many benefits for organization apart from time saving and accuracy already mentioned, other advantages include: Reduced administration time by automating payroll calculation and printing of paychecks Eliminated tax penalties for inaccurate returns or late payments of amounts withheld Improved payroll accuracy with automatic tax and deduction calculations Easily compensate employees for work performed Improved organization with consolidation of all payroll related records and reports Increased speed in adjusting to regulations by receiving periodic updates and effortlessly produce the required governmental reporting Eliminated paper check security issues with direct-deposit capability Increased accuracy of tracking payroll expenses to the proper general ledger account or customer job Reduction of administrative overhead Automation of many manual processes Provides timely payroll processing

12

2.2.3 Controls for Computerized Payroll Systems.


Computerized accounting system must have the same basic controls as manual accounting systems in order to ensure accuracy, honesty, efficiency and speed. However, automated accounting systems also require special controls. This is because one major disadvantage to computerized accounting systems is that there is a greater possibility for fraud and dishonesty than with a manual system (David H.Weaver et al, 1998). Some of the controls that organizations use to ensure that computerized records are not tampered with, whether accidentally or for dishonest purposes includes:

Organizational controls: when a business sets up a computerized system, it can


organize the system in such a way to ensure maximum controls. For example, computer equipments should be kept in a separate room that can be locked. Only employees who are authorized to use the system and the equipment should be allowed into the room. Another control is dividing responsibility for the tasks required by the system among a number of employees. For example, the person who designs the system or the procedures to be followed, the people who operate the computers and the people in charge of the disks or tapes on which programs or back-ups are stored should all work separately from each other.

Program controls: certain controls can be built into the program itself. For example
some programs require that a password is entered into the system before access can be made to the program. This is usually a code that prevents others from having access to the work that is being done. Password is a special word or combination of letters or numbers. Passwords are used to protect confidential files or information. An example of a

13

password is the personal identification number (PIN), user login identification and authentication. An error report is a control in which computer is instructed not to process something. For example, the computer can be instructed not to write a check for more than one hundred thousand naira. If a check request for one hundred and twenty thousand naira is possessed, the computer will not issue the check. However, it will issue an error report and refer the request to management. This report alerts management to possible unauthorized attempts to use the program. An item count is a control in which the software is programmed to allow a specified number of items to be processed. For example, in processing payroll checks, the computer can be instructed to print out only a certain number of checks. As each is printed, a count is made. If the number of checks requested is different than the number of employees, the program issues an alert.

Application control: Application controls prevent or detect errors and irregularities


in an application system. They do this during input of data, during processing of data by computer, and with outputs from processing. Application controls in the payroll system is illustrated below: Input: Completeness test ensures that program verifies the existence of employee name and identification number. Processing: Record count ensures that the program verifies the number of input transaction records is equal to the number of output transaction records. Output: Record count ensures the program verifies that the total amount of paychecks is equal to the number of payroll transaction records.

14

Program also verifies that the total amounts of paychecks is equal to total debits and credits on general ledger accounts.

2.3 PAYROLL REPORTS


According to J.L Bookholdt (1999), Payroll systems produce three types of report: the payroll register, control reports for pay checks, and various cumulative earnings reports.

Payroll register: Payroll systems produce a payroll register prior to printing payroll
checks. The register lists all employees for whom paychecks are due. For each employee, it shows the gross pay, list all deductions, and show net pay. Producing the payroll register is an important control practice because a payroll supervisor will have to review the payroll register for errors before printing the paychecks. Then a clerk corrects error prior to printing the checks. This avoids printing erroneous checks that could be stolen and cashed.

Print checks control report: Because paychecks can easily be stolen or falsified,
the system must control their preparation. The print checks control report aids in detecting missing or unauthorized checks. The computer program that prints checks also produces this control report showing the number of checks printed and the total amount of these checks. The data control group compares these control totals with the checks.

Cumulative earnings report: Employers are required to withhold taxes from


employees paychecks and send these taxes to government. Payroll systems aid in this process by producing several kinds of cumulative earnings reports, which summarize the gross pay and tax withheld for an employee.

15

2.4 REVIEW OF THE EXISTING SYSTEM


Manual Payroll systems maintain data in a filling cabinet about each individual employee. Payroll clerks then use data in this file to calculate gross pay and to determine the amount of deductions. They also record in this file, cumulative earnings information for individual employees. Non computerized systems use a journal called payroll register, in which a payroll clerk records the calculation for gross pay, deductions and net pay. In the manual system, personnel department screens applicant, authorizes the employees initial pay rate, and creates the manual employment record and then sends a copy to the payroll department. For salaried employees, this record authorizes a periodic paycheck. There are seven departments in Kosofe Local Government namely: Personnel Finance Work/Housing Agriculture/Rural Education Budget/Planning/Statistics department Primary Health Care

Other Units are under the chairmans office in the Local Government and these include: Audit Information and the Legal

16

All processes to compute the payroll to pay employees salaries in all these departments are done manually in Kosofe Local Government. The personnel department completes a series of activities prior to and at the beginning of employment and forwards the information to the payroll department. Before the new employee begins work, certain personnel records must be completed. Generally these records form the basis for deductions that will be made from the employees gross pay. For a newly employed staff, a letter of appointment stating the grade level and step is given to the new employee and a copy will be submitted in the personnel department, after which the personnel department will send a copy of the appointment letter to the finance department in care of the council treasurer. The council treasurer will minute on the appointment letter to the officer in charge of salaries to open a personal emolument record for the new employee. The personal emolument record shows the name, address, the grade level and step of the employee, the incremental date and the salary details (Gross pay, deductions and net pay) every month for each employee for the year. It is from the personal emolument record that salary details will be entered into the payment salary voucher. The payment salary voucher contains total of salaries paid to all employees in all departments in the Local Government, it is also from the payment salary voucher that payment slips and checks are written out. The payment slip and checks are dispatched to every staffs after they are written out. It is after they have gotten their payment slip and checks that they can go to the bank to collect their salaries.

17

For an existing staff, the process still remains the same as for a newly employed staff except that while the old staff is leaving the former Local Government, he/she will go to the new Local Government with the following documents: Last Pay Certificate Release letter Record of service

All the mentioned documents will be submitted to the Head of Department/Director of the personnel department and the process continues the same way as for the newly employed staff. For a retiree, a letter is sent from the permanent secretary of local government service commission to the chairman of the local government who minutes on it and sends it to the head of personnel department. The head of personnel department then sends it to the council treasurer, who sends it to the officer in charge of salary with the order to stop payment of salary to the retiree after three months from that date. All this processing involved in paying salaries are done manually and all records are stored in files which are eventually stored in a file cabinet. All these manual processes have resulted in problems such as: Missing records Theft and fraudulent practices Errors Wastage of materials and Lack of adequate information.

18

CHAPTER THREE 3.0 SYSTEM ANALYSIS AND DESIGN

3.1 INTRODUCTION
According to Simon Bennett et al (2002), system analysis is defined as a process of seeking to understand the organization, investigating its requirements and modeling them. System analysis can also be referred to as the study of a business problem domain to recommend improvements and specify the business requirements for the solution. (Jeffrey.L.Whitten et al, 2001) It is the result of this analysis activity that gives the specification of what the proposed system will do based on the requirements. System analysis is the study of a system and its component as a prerequisite to system design. It is a problem solving technique that decomposes a system into its component pieces for the purpose of studying how well those components work and interact to accomplish their purpose. Contemporarily, System analysis is a term that collectively describes the early phases of system development. There are many approaches to system analysis and these include structured analysis, information engineering, discovery prototyping, and object oriented analysis. For the purpose of this project, the object oriented analysis will be used for the system analysis and design. System analysis is a very important aspect of system development because during this phase several fundamental decisions are made. During the analysis the system owner and user are specified because the system analysis is driven by the business concerns of the system owners and users, system analysis also reveals what the system would do and it 19

helps the stakeholders know whether the proposed system is technically, economically and operationally feasible.

3.2 BRIEF REVIEW OF THE EXISTING SYSTEM


Processes to compute the payroll in Kosofe Local Government are done manually. Records and payment details about each employee is kept in a personal emolument card and payment salary voucher, which are stored in files and eventually in a file cabinet. The harmonized public service salary structure is used to determine the amount to be paid to employees in the Local Government and this is based on employees grade level and step. The net pay for each employee is gotten after subtracting the total deductions from the gross earnings.

3.3 DESCRIPTION OF PROPOSED COMPUTERISED SYSTEM


Details from the personal emolument card and payment salary voucher will be used to create a database in the computerized system to keep the records and payment details of all employees in all departments in the Local Government. Computation of each employees earnings will be based on the provisions made on the harmonized public service salary structure. In the proposed system, three access options will be provided, where you either login as a staff, salary officer or payroll administrator. For the staff, one will only be able to view report/paycheque. As a salary officer, one will be able to compute net pay, view and print reports and pay cheques but wont be able to edit employees records. The payroll administrator will be the only one who has the access right to edit records, basic salaries

20

and specify percentages that will be used to compute payments. Staffs, Salary officers and Payroll Administrator at the login interface will have to enter their username and password in the text fields as contained in the database. If username and password are valid for respective users as contained in the database, the system welcomes them and takes them to the menu interface as related to individual users. For the staffs, the system takes them to the menu where they will be able to view reports and paycheque while for the salary officer, the system opens the menu interface where all payroll processes are contained. In the payroll module, the salary officer after entering key details about the employee, the program will automatically call other payments from the database and display the net pay for the pay period. The payroll administrator will be granted access to the database where records can be modified, edited and updated. The output that will be generated from the proposed system will be the paycheque, staffs report and management report needed at different levels. The computerization of the existing system will help to address problems such as missing records, theft and fraudulent practice, arithmetic errors, wastage of materials, lack of adequate information, e.t.c in the system.

21

3.4 SYSTEM DESIGN


System design is the specification or construction of a technical, computer-based solution for the business requirements identified in a system analysis (Jeffrey.L.Whitten et al, 2001) System design is concerned with establishing how to deliver the functionality that was specified in analysis while at the same time, meeting non-functional requirements that may sometimes conflict each other. System design is focused on making high-level decisions concerning the overall structure of the system. It also involves establishing protocols and standards for the design activities. (Simon Bennet et al, 2002). System design is divided into stages: Logical (implementation independent): This is concerned with those aspects of the system that can de designed without knowledge of the implementation platform. Physical (implementation dependent): This is concerned with those aspects of the system that are dependent on the implementation platform that will be used. In the object oriented analysis and design, Unified Modeling Language will be used to model the system. A model is the act of drawing one or more graphical representations of a system. Modeling is the process of abstracting and organizing significant features of part of the real world.

22

The following UML diagrams will be used to model the system: Use-Case diagram Activity diagram Sequence diagram

23

COMPUTERIZED PAYROLL SYSTEM

Compute Pay

Prepare Paycheque Management

View Report/Paycheque

Salary Officer

Print Report/Paycheque

Staff

Edit Record

PayrollAdministrator

Update Record

FIG 1 USE CASE DIAGRAM

24

Enter employee paydetails

Read paydetail from database

Compute Netpay

Print out Cheque

Go to Bank

Receive Salary

FIG 2 ACTIVITY DIAGRAM

25

Welcome

Menu

Payroll

Report/Paycheque

Update

Database

Exit

Enter Username/Password Verify Password/Username

Valid
Staff Welcome Staff View Report

Yes
Exit system

Enter Username/Password Verify Username/Password

Valid
SalaryOfficer Enter key details Read Other Paydetails From Database Welcome Salary Officer

Yes

Compute Netpay

View/Print Paycheque Exit system

Enter Username/Password Verify Username/Password

Valid
PayrollAdministrator Welcome PayrollAdministrator

Yes

Edit,Update Employee Records Save to DB Exit system

FIG 3 SEQUENCE DIAGRAM

26

3.5 DATABASE DESIGN AND DESCRIPTION


A database can be defined as a body of information held within a computer system using the facilities of a database management system. (Myrvin F.Chester, Avtar k.Athwall,2002) A database can also be defined as an organized collection of data. There are many strategies for organizing data to facilitate easy access and manipulation. Database management systems allow for access and storage of data without concern for the internal representation of data. A database management system provides mechanisms for storing and organizing data in a manner consistent with the databases format. There are several types of database management systems. They can be classified according to the way they structure records. Early database management systems organized records in hierarchies or networks implemented with indexes and linked list. But today, most successful database management systems are based on relational technology. (Jeffrey Whitten et al, 2001) A relational database is a logical representation of data that allows data to be accessed without consideration of the physical structure of the data. A relational database stores and implements data in a series of two-dimensional tables that are related to one another via foreign keys. Each table are sometimes called relation consists of named columns (fields or attributes) and any number of unnamed rows (records). A data manipulation language is used to create, read, update and delete records in the database and to navigate between different records. The data manipulation language of most relational database is called SQL. It supports complete database creation, maintenance, and usage. It also provides basic commands such as (SELECT, FROM, WHERE, INSERT, UPDATE, DELETE, e.t.c) to access data in tables.

27

The structured query language can be used in two ways: interactively or embedded inside another program. It is used interactively to directly operate a database and produce the desired results. The second way to execute a SQL command is by embedding it in another language such as COBOL, BASIC, Visual Basic, C or Java. The result of the embedded SQL command is then passed to the variables in the host program, which in turn will deal with them. This application is implemented by combining structured query language (SQL) together with a high level language (JAVA) which allows the creation of user interfaces and database access in one application. To design the illustration above, it would commence with the database design which would reveal all the necessary component, entities and attribute that would be needed through out the course of our implementation. The database design includes three major tables which would serve as the basis of discussion for the requirement of the system. The tables (records) used are listed below as applied within the program listing. The following shows the payroll database and its schema: 1. Personnel (StaffId, StaffName, StaffAddress, GradeLevel, Step, Sex, Department, BasicSalary, Overtime, TransportAllowance, MonthlyTax, UnionDues, Netpay) 2 3 MonthlyBasicSalary (GradeLevel,Step1,Step2,Step3,Step4,Step5,Step6Step15) Users (UserName ,Password, Status)

28

CHAPTER FOUR 4.0 SYSTEM IMPLEMENTATION

4.1 INTRODUCTION
Implementation is the process by which a system developed is utilized and made functional or the process of converting a new system design into operation. It is the delivery of the system into production. This is the phase where all the requirement analysis and system design is put to test to ensure effective delivery of the system.

4.2 SYSTEM REQIUREMENTS

4.2.1 Hardware Requirement


This is the aspect concerned with the physical components of the computer needed for the effective operation of the new system. The software will run well with under listed hardware specification: Intel Pentium III 500 MHz or compatible 512 MB RAM (recommended minimum) 768 MB RAM (recommended) 560-760 MB hard disk space minimum (depending on features installed) 4GB Hard disk(recommended) A SVGA color monitor with high resonance A power surge

29

U.P.S

4.2.2 Software Requirement


This aspect specifies the various events the proposed system would be able to perform from the users perspective in order to ensure a good and working system. The following are the software needed for the smooth running of the package: JRE(Java Runtime Environment) J2SE 1.4,J2EE and J2ME Microsoft Windows XP, 2000 or NT 4.0 Microsoft SQL Server.

4.3 MODULES DESCRIPTION AND IMPLEMENTATION.


Below are the description and implementation of each frame (module) and dialogs (sub modules) in class salaries as contained in the program:

Welcome Module: This module allows users to login and have access options in
order to be able to access other modules as related to individual user. The payroll administrator login his/her username as contained in the database in order to be able to edit records in the database, In this same module the salary officers and the staffs also login their username and password in order to be able to view and print reports/ paycheques and compute net pay respectively. To login, click on the username and password text field and type in the username and password respectively, then click on the ok button to login. See interface in appendix 2.

30

Menu Module: This is the module for users who login as salary officers and this is
where the actual payroll computation is done. When users login in this module, they will be able to perform different tasks such as viewing and printing of reports and paycheques and computing of the salaries. This module contains sub modules such as the file and payroll sub modules. See interface in appendix 2.

File Sub Module: From the file sub module, the salary officer is able view and print
report/pay cheques. To view and print reports/paycheque, click on file, open, and then click on the report/paycheque that is to be viewed or printed and click print. See interface in appendix 3.

Payroll Sub Module: This is contained in the menu module. This is where the actual
payroll process takes place. To compute salaries, click on paydetail, payroll and then the payroll page comes up. In the payroll page, enter key details such as the satffId, grade level and employee step, then click on compute button to generate net pay for the pay period. See interface in appendix 2.

Payroll Administrator Module: Only the payroll administrator has access into
this module and this is where records can be edited and updated. When the payroll administrator login his/her username and password in the login menu, the program automatically brings the administrator to this admin module and it is from this module that other sub modules such as Personnel Adjustment, Percentage Allocation, and Update Basic Salaries can be viewed and worked on. See interface in appendix 2.

Personnel Adjustment Sub Module: It is from this module that the payroll
administrator will be able to add the records of new employees search and delete existing record of employees. To add the record of a new employee, enter data into the text fields

31

and click on new button, to delete an existing record, enter the staffId and click on search button to bring out details of the particular employee to be deleted and then click on delete button to delete the record. See interface in appendix 2.

Percentage Allocation Sub Module: This is interface where changes in


percentage used on basic salary will be entered into the percentage table in the database. To change the percentages used, click on activate button to activate the fields and then enter into the fields the new percentages and click on save to reflect changes in the percentage table in the database. See interface in appendix 2.

Update Basic Salaries Sub Module: This interface is made available in order to
make the system flexible in that when changes are made to the basic salaries, it will be reflected from this interface and then saved into the database as the new basic salary value for all grade levels and steps. To update basic salary table, click on activate button to activate the fields and then enter into the fields the new values for the basic salaries, then click on the update button to update the basic salary table in the basic salary table in the database. See interface in appendix 2.

Staffs Module: This is the module that allows staffs to be able to view their report
/paycheque. To view report/paycheque, enter staffid, staff name, grade level and step and then click on search button to view records as pertaining to the indicated staff. See interface in appendix 3.

ConnectDB Modules: This is the database class that connects all the programs with
the database.

32

4.4 CHOICE OF PROGRAMMING LANGUAGE


Java programming language is used for the implementation of this application and this is because of its rich features and these include the following among others: Has many in built functions Easy manipulation Flexibility It is a high programming language It is an object oriented programming language It supports network and web applications It is a cross platform programming language Its functions and controls are designed to easily facilitate programming It supports multi-programming

33

CHAPTER FIVE 5.0


5.1

SUMMARY, RECOMMENDATION AND CONCLUSION


SUMMARY

Developing a system requires the system developer to meet the user requirements of the proposed system and as a result of this, the developer must fully understand what the problems are, understand the people for whom he/she is designing the system for in order for the system to communicate effectively.

5.2 RECOMMENDATION
Considering the rate of technological development in our society today, any organization that want to remain in the forefront of todays competitive market is left with no choice than to computerize the manual system that are operational in their organization. Other recommendations include: Putting in place computers and other peripherals that would allow the usage of the system. Installation of Java 2 Software Development Kit (J2SDK1.4.1) and

PAYMASTER software with Microsoft SQL server engine. A good training background for the users of the system in order to familiarize with the software. A recovery/back up must be in place. 34

Lastly, adequate environmental security must be provided for the confidentiality of information.

5.3 CONCLUSION
The development of this application software is to help solve problems associated with the existing system and this has been achievable to an extent. The merits of the new system outweigh the advantages (if any) of the existing system. It does not only provide automation, it has also replaced the traditional cabinet file storage method that deals with a lot of paper work thereby, allowing ease in the storing, handling and retrieval of data in a dynamic way. In concluding this project, I would like to highlight areas for future development and these include: Reviewing of this project work to see what has been done and then look out for what the project should have accomplished that has not been implemented in it for those who desire to continue on this project. Furthermore, certain features must be included in the system in order to justify improvements on the current version and this include putting in place a multi-user system that allows for use in a network environment so that information can be made available in all other Local Governments as well other parts of the organization under study.

35

REFERENCES
1. Jeffrey L.Whitten, Lonnie D.Bentley and Kevin D.Dittman (2001). System Analysis and DesignMethods. New York, Irwin/McGraw-Hill, Fifth Edition, pp13, 479. 2. Simon Bennet, Steve McRobb and RayFarmer (2002). Object Oriented Systems Analysis and Design Using UML, Maiden: McGraw-Hill, Second Edition, pp301, 321. 3. J.L.Boockhdt (1999) Accounting Information Systems-Transaction Processing and Controls. United States of America, Irwin/McGraw-Hill, pp 673-674. 4. David H.Weaver, Edward B. Bruner, James.M.Smiley and Virginia A. Rose (1988). Accounting Systems and Procedures. United States of America, McGraw-Hill, Fifth Edition, pp 443-449. 5. Gregory E.Anders, Emmajo Spiegel berg and Sally Nelson (2002).

Microcomputer Accounting-Tutorial and Applications. United States of America, Glencoe/McGraw-Hill, pp196-197. 6. Mark Priestley (2003) Practical Object-Oriented Design With UML. New York. McGraw-Hill. Second Edition, pp330-333. 7. Myrvin F. Chester, Avtar.K. Athwall (2002). Introduction to Basic Information Systems Analysis and Design .New York. McGraw-Hill, pp 212. 8. Payroll, Wikipedia the free encyclopedia.htm, 2006. www.alltheweb.com.

36

APPENDIX 1 FLOWCHART DIAGRAMS

37

SYSTEM FLOWCHART

LOGIN SCREEN

OPTION MENU

DATABASE

MODULES/PROCESSINGS

REPORTS

38

GENERAL MENU

Start

Welcome Screen

Enter Username/ Pasword

Update Staff Records

Percentage Allocation Payroll Administrator Option YES Basic Salaries

NO

File Module Salary Officer Option YES

Pay detail Module

NO

Staffs Option

YES

View Report/ Paycheque Module NO

Exit System

39

PAYROLL PROCESSING

Start

Enter staff details

Compute Netpay

Program reads pay details from database and display

Exit

40

APPENDIX 2 INPUT DESIGN

41

FIG 5 LOGIN INTERFACE

42

FIG 5 LOGIN INTERFACE

43

FIG 6 PAYROLL ADMINISTRATOR INTERFACE

44

FIG 7 PERSONNEL ADJUSTMENT INTERFACE

45

FIG 8 PERCENTAGES /FIXED ALLOCATION INTERFACE

46

FIG 9 BASIC SALARY INTERFACE

47

FIG 10 MENU INTERFACE

48

FIG 11 PAYROLL INTERFACE

49

APPENDIX 3 OUTPUT DESIGN

50

FIG 12 OPEN REPORT/CHEQUE INTERFACE

51

FI G 13

GENERAL PAYROLL SUMMARY

52

FIG 14 STAFF REPORT

53

APPENDIX 4 PROGRAM LISTINGS

package salarys;

54

import java.sql.*; import javax.swing.*; public class ConnectDB { private Connection connection; private Statement statement; private ResultSet resultset; private String jdbcDriver="sun.jdbc.odbc.JdbcOdbcDriver"; private String databaseUrl="jdbc:odbc:NIYI"; public ConnectDB() { } public ConnectDB(String driver,String database) { jdbcDriver = driver; databaseUrl = database; } public void setDriver(String driver) { jdbcDriver = driver; } public void setDatabase(String database) { databaseUrl = database; } public Statement connect() { try { Class.forName(jdbcDriver); connection = DriverManager.getConnection(databaseUrl); statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONC UR_READ_ONLY); } catch(Exception e) { statement = null;

55

} finally { return statement; } } public int disconnect() { int result=1; try { if(statement!=null) statement.close(); if(connection!=null) connection.close(); } catch(Exception e) { result = 0; } finally { return result; } } public String getDriver() { return jdbcDriver; } public String getDatabase() { return databaseUrl; } public ResultSet setQuery(String query) { try { resultset=statement.executeQuery(query); } catch(SQLException sqle) {

56

JOptionPane.showMessageDialog(null,query+"\n"+sqle.toString()); resultset=null; } return resultset; } public int setUpdate(String query) { int result; try { result=statement.executeUpdate(query); } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,sqle+" Funny Error"); result=0; disconnect(); } return result; } }

package salarys;

57

import java.sql.*; import javax.swing.*; import java.awt.*; import com.borland.jbcl.layout.*; import java.awt.event.*; import javax.swing.event.*; import com.borland.dx.sql.dataset.*; import com.borland.dbswing.*; import com.borland.dx.dataset.*; import javax.swing.border.*; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class Payroll extends JDialog { String stepNo,gradeNo,STAFFID; ConnectDB condb=new ConnectDB(); String query,query1,query2; ResultSet rs, rs1,rs2; int overtime, rentallow, shift, transport, vehicleallow, courseutility, hazard, monthlytax, rentdeduct, uniondues, thrift, vehiclededuct, housing, typist, namm,BASIC,totalgross,totaldeduction,totalnetpay; JPanel panel1 = new JPanel(); XYLayout xYLayout1 = new XYLayout(); JLabel GRADELEVELLabel1 = new JLabel(); JTextField gRADELEVELTextField1 = new JTextField(); JLabel STEPLabel1 = new JLabel(); JTextField sTEPTextField1 = new JTextField(); JLabel STAFFIDLabel1 = new JLabel(); JTextField sTAFFIDTextField1 = new JTextField(); JLabel STAFFNAMELabel1 = new JLabel(); JTextField sTAFFNAMETextField1 = new JTextField(); JPanel jPanel1 = new JPanel(); XYLayout xYLayout2 = new XYLayout(); JButton jButton1 = new JButton(); JLabel VEHICLELOANLabel2 = new JLabel(); JLabel BASICSALARYLabel2 = new JLabel(); JTextField hOUSINGLOANTextField1 = new JTextField(); JLabel RENTDEDUCTLabel2 = new JLabel();

58

JLabel TGPLabel2 = new JLabel(); JLabel OVERTIMELabel2 = new JLabel(); JLabel NANNMSLabel2 = new JLabel(); JLabel TRANSPORTLabel2 = new JLabel(); JLabel RENTLabel2 = new JLabel(); JTextField tOTALNETPAYTextField1 = new JTextField(); JTextField tOTALDEDUCTIONTextField1 = new JTextField(); JTextField mONTHLYTAXTextField1 = new JTextField(); JTextField tYPISTLOANTextField1 = new JTextField(); JLabel MONTLYTAXLabel2 = new JLabel(); JLabel HAZARDLabel2 = new JLabel(); JTextField rENTTextField1 = new JTextField(); JLabel TDLabel2 = new JLabel(); JLabel TYPISTLabel2 = new JLabel(); JLabel NPLabel2 = new JLabel(); JLabel HOUSINGLabel2 = new JLabel(); JLabel SHIFTLabel2 = new JLabel(); JLabel VEHICLELabel2 = new JLabel(); JTextField uTILITYTextField1 = new JTextField(); JTextField hAZARDTextField1 = new JTextField(); JTextField sHIFTTextField1 = new JTextField(); JTextField bASICTextField1 = new JTextField(); JTextField tRANSTextField2 = new JTextField(); JLabel UTILITYLabel2 = new JLabel(); JLabel DEDUCTLabel2 = new JLabel(); JTextField nAMMSASSOCIATIONTextField1 = new JTextField(); JTextField oVERTIMETextField1 = new JTextField(); JTextField tHRIFTTextField1 = new JTextField(); JTextField tOTALGROSSTextField1 = new JTextField(); JLabel EARNINGSLabel2 = new JLabel(); JLabel THRIFTLabel2 = new JLabel(); JTextField rENTTextField2 = new JTextField(); JTextField uNIONDUESTextField1 = new JTextField(); JTextField vEHICLEALLOWTextField1 = new JTextField(); JLabel jLabel2 = new JLabel(); private JButton COMPUTEButton2 = new JButton(); Statement stmt; int result; //ConnectDB condb; String sql; JTextField vEHICLELOANTextField1 = new JTextField();

59

public Payroll(Frame frame, String title, boolean modal) { super(frame, title, modal); try { jbInit(); pack(); this.setSize(1000,1200); this.setVisible(true); } catch(Exception ex) { ex.printStackTrace(); } } public Payroll() { this(null, "", false); } public void actionPerformed(ActionEvent e) { COMPUTEButton2_actionPerformed(e); } }); vEHICLEALLOWTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { vEHICLEALLOWTextField1_actionPerformed(e); } });

void sTAFFIDTextField1_actionPerformed(ActionEvent e) { } void UTILITYTextField1_actionPerformed(ActionEvent e) { }

void COMPUTEButton2_actionPerformed(ActionEvent e) { String stepNo = sTEPTextField1.getText();

60

int gradNo= Integer.parseInt(gRADELEVELTextField1.getText()); float OVERTIME,RENTALLOW,VEHICLEALLOW,HAZARD,SHIFT,COURSEUTILITY, TRANSPORTALLOW; float MONTHLYTAX,RENTDEDUCT,THRIFT,VEHICLEDEDUCT,HOUSINGLOAN,TYP ISTLOAN,UNIONDUES,NAMMASSOCIATION; float TOTALGROSS,TOTALDEDUCTION,TOTALNETPAY; String qry="select STEP" +stepNo+ " from MONTHLYBASICSALARY where GRADELEVEL = "+gradNo; JOptionPane.showMessageDialog(null,qry); rs=condb.setQuery(qry); try { if(rs.next()) { BASIC=Integer.parseInt(rs.getString("STEP"+stepNo)); } } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,"Error! "+sqle); } OVERTIME =overtime/100*BASIC; RENTALLOW =rentallow/100*BASIC; VEHICLEALLOW =vehicleallow/100*BASIC; HAZARD =hazard/100*BASIC; SHIFT =shift/100*BASIC; TRANSPORTALLOW =transport/100*BASIC; COURSEUTILITY =courseutility/100*BASIC; MONTHLYTAX =monthlytax/100*BASIC; RENTDEDUCT =rentdeduct/100*BASIC; THRIFT =thrift/100*BASIC; VEHICLEDEDUCT =vehiclededuct/100*BASIC; HOUSINGLOAN =housing/100*BASIC; TYPISTLOAN =typist/100*BASIC; NAMMASSOCIATION = namm/100*BASIC; UNIONDUES =uniondues/100*BASIC; TOTALGROSS=BASIC+OVERTIME+RENTALLOW+SHIFT+TRANSPORTALLO W+VEHICLEALLOW+COURSEUTILITY+HAZARD; TOTALDEDUCTION=MONTHLYTAX+RENTDEDUCT+UNIONDUES+THRIFT+ VEHICLEDEDUCT+HOUSINGLOAN+TYPISTLOAN+NAMMASSOCIATION; TOTALNETPAY = TOTALGROSS - TOTALDEDUCTION;

61

//CONVERTING VARIABLES TO TEXT SO AS TO SET THEM AS TEXT IN STRING CLASS String STROVERTIME = Float.toString(OVERTIME); String STRBASIC = Float.toString(BASIC); String STRRENTALLOW = Float.toString(RENTALLOW); String STRVEHICLEALLOW = Float.toString(VEHICLEALLOW); String STRCOURSEUTILITY = Float.toString(COURSEUTILITY); String STRHAZARD = Float.toString(HAZARD); String STRSHIFT = Float.toString(SHIFT); String STRMONTHLYTAX = Float.toString(MONTHLYTAX); String STRRENTDEDUCT = Float.toString(RENTDEDUCT); String STRTHRIFT = Float.toString(THRIFT); String STRVEHICLEDEDUCT = Float.toString(VEHICLEDEDUCT); String STRHOUSINGLOAN = Float.toString(HOUSINGLOAN); String STRTYPISTLOAN = Float.toString(TYPISTLOAN); String STRNAMMASSOCIATION = Float.toString(NAMMASSOCIATION); String STRUNIONDUES = Float.toString(UNIONDUES); String STRTOTALDEDUCTION = Float.toString(TOTALDEDUCTION); String STRTOTALGROSS = Float.toString(TOTALGROSS); String STRTOTALNETPAY = Float.toString(TOTALNETPAY); bASICTextField1.setText(STRBASIC); oVERTIMETextField1.setText(STROVERTIME); rENTTextField1.setText( STRRENTALLOW); vEHICLELOANTextField1.setText(STRVEHICLEALLOW); uTILITYTextField1.setText(STRCOURSEUTILITY); hAZARDTextField1.setText(STRHAZARD); sHIFTTextField1.setText(STRSHIFT); mONTHLYTAXTextField1.setText(STRMONTHLYTAX); rENTTextField1.setText(STRRENTDEDUCT); tHRIFTTextField1.setText(STRTHRIFT); vEHICLELOANTextField1.setText(STRVEHICLEDEDUCT); vEHICLELOANTextField1.setText(STRVEHICLEALLOW) ; hOUSINGLOANTextField1.setText(STRHOUSINGLOAN); tYPISTLOANTextField1.setText(STRTYPISTLOAN); nAMMSASSOCIATIONTextField1.setText(STRNAMMASSOCIATION); uNIONDUESTextField1.setText(STRUNIONDUES); tOTALDEDUCTIONTextField1.setText(STRTOTALDEDUCTION); tOTALGROSSTextField1.setText(STRTOTALGROSS); tOTALNETPAYTextField1.setText(STRTOTALNETPAY); STAFFID=sTAFFIDTextField1.getText(); query2="INSERT INTO PERSONNEL(BasicSalary,Overtime,HazardAllowance,RentAllowance,VehicleAllowan ce,ShiftAllowance,TransportAllowance,CourseUtilityAllowance,MonthlyTax,RentDeduc t,Thrift,VehicleLoan,HousingLoan,TypistLoan,NammAssociation,UnionDues,TotalGros

62

spay,TotalDeduction,TotalNetpay) VALUES ('"+BASIC+"','"+overtime+"','"+ hazard+"','"+rentallow+"','"+vehicleallow+"','"+shift+"','"+transport+"','"+courseutility+"' , '"+monthlytax+"','"+rentdeduct+"','"+thrift+"','"+vehiclededuct+"','"+housing+"','"+typist +"','"+namm+"','"+uniondues+"','"+totalgross+"','"+totaldeduction+"','"+totalnetpay+"') WHERE StaffId='"+STAFFID+"'"; result=condb.setUpdate(query2); } void vEHICLEALLOWTextField1_actionPerformed(ActionEvent e) { } } class Payroll_jButton1_actionAdapter implements java.awt.event.ActionListener { Payroll adaptee; Payroll_jButton1_actionAdapter(Payroll adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { } } class Payroll_STAFFIDTextField1_actionAdapter implements java.awt.event.ActionListener { Payroll adaptee; Payroll_STAFFIDTextField1_actionAdapter(Payroll adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { } }

package salarys;

63

import java.sql.*; import javax.swing.*; import java.awt.*; import com.borland.jbcl.layout.*; import java.awt.event.*; import javax.swing.event.*; import com.borland.dx.sql.dataset.*; import com.borland.dbswing.*; import com.borland.dx.dataset.*; import javax.swing.border.*; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class PayAdmin extends JFrame { //private String name="Update.jpg"; private Icon icon = new ImageIcon(salarys.PayAdmin.class.getResource( "pix1.jpg")); String stepNo,gradeNo; ConnectDB condb1=new ConnectDB(); String query1,query2,query3,query4; ResultSet rs1,rs2; String USERNAME,PASSWORD,CATEGORY,STAFFID,STAFFNAME,STAFFADD,SEX,G RADELEVEL,STEP,DATEEMP,INCREAMENTALDATE; public PayAdmin() { try { jbInit(); this.setSize(500,700); this.setVisible(true); } catch(Exception ex) { ex.printStackTrace(); } } void jbInit() throws Exception { DELETEButton1.setFont(new java.awt.Font("Dialog", 1, 11)); DELETEButton1.setText("DELETE");

64

DELETEButton1.addActionListener(new PayAdmin_DELETEButton1_actionAdapter(this)); this.getContentPane().setBackground(Color.pink); this.setTitle("PERSONNEL ADJUSTMENT"); USERNAMELabel1.setText("USERNAME"); uSERNAMETextField1.setText(""); PASSWORDLabel1.setText("PASSWORD"); passwordTextField1.setText(""); ADDButton1.setFont(new java.awt.Font("Dialog", 1, 11)); ADDButton1.setText("ADD"); ADDButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { ADDButton1_actionPerformed(e); } }); SEARCHButton1.setFont(new java.awt.Font("Dialog", 1, 11)); SEARCHButton1.setText("SEARCH"); SEARCHButton1.addActionListener(new PayAdmin_SEARCHButton1_actionAdapter(this)); void uSERNAMETextField1_actionPerformed(ActionEvent e) { } void passwordTextField1_actionPerformed(ActionEvent e) { } void DELETEButton1_actionPerformed(ActionEvent e) { //STAFFID=sTAFFIDTextField1.getText(); STAFFNAME=sTAFFNAMETextField1.getText(); STAFFADD=sTAFFADDTextField1.getText(); GRADELEVEL=gRADELEVELTextField1.getText(); STEP=sTEPTextField1.getText(); DATEEMP=dATEEMPTextField1.getText(); INCREAMENTALDATE=iNCREAMENTTextField1.getText(); SEX=sEXTextField1.getText(); query4="DELETE FROM PERSONNEL (StaffName,StaffAddress,Sex,GradeLevel,Step,DateEmployed,IncreamentDate) WHERE StaffId='"+ STAFFID +"'"; result = condb.setUpdate(query4); }

65

void ADDButton1_actionPerformed(ActionEvent e) { STAFFID=sTAFFIDTextField1.getText(); STAFFNAME=sTAFFNAMETextField1.getText(); STAFFADD=sTAFFADDTextField1.getText(); GRADELEVEL=gRADELEVELTextField1.getText(); STEP=sTEPTextField1.getText(); DATEEMP=dATEEMPTextField1.getText(); INCREAMENTALDATE=iNCREAMENTTextField1.getText(); SEX=sEXTextField1.getText(); query1="INSERT INTO PERSONNEL(StaffId,StaffName,StaffAddress,Sex,GradeLevel,Step,DateEmployed,Incr eamentDate) VALUES ('"+STAFFID+"','"+STAFFNAME+"','"+STAFFADD+"','"+SEX+"','"+GRADELEVEL+ "','"+STEP+"','"+DATEEMP+"','"+INCREAMENTALDATE+"')"; result = condb.setUpdate(query1); USERNAME= uSERNAMETextField1.getText(); PASSWORD= passwordTextField1.getText(); CATEGORY= cATEGORYTextField1.getText(); query2="INSERT INTO USERS(USERNAME,PASSWORD,CATEGORY)VALUES('"+USERNAME+"','"+PAS SWORD+"','"+CATEGORY+"')"; result = condb.setUpdate(query2); } void jButton1_actionPerformed(ActionEvent e) { Open open = new Open(); jLabel1.setIcon(icon); } void SEARCHButton1_actionPerformed(ActionEvent e) { //STAFFID=sTAFFIDTextField1.getText(); STAFFNAME=sTAFFNAMETextField1.getText(); STAFFADD=sTAFFADDTextField1.getText(); GRADELEVEL=gRADELEVELTextField1.getText(); STEP=sTEPTextField1.getText(); DATEEMP=dATEEMPTextField1.getText(); INCREAMENTALDATE=iNCREAMENTTextField1.getText(); SEX=sEXTextField1.getText(); query3="select StaffName,StaffAddress,Sex,GradeLevel,Step,DateEmployed,IncreamentDate from PERSONNEL where StaffId='"+ STAFFID +"'"; try

66

{ rs=condb.setQuery(query3); if(rs.next()) { STAFFID=rs.getString("StaffId"); STAFFNAME=rs.getString("StaffName"); STAFFADD = rs.getString("StaffAddress"); SEX=rs.getString("Sex"); GRADELEVEL = rs.getString("GradeLevel"); STEP = rs.getString("Step"); DATEEMP=rs.getString("DateEmployed"); INCREAMENTALDATE=rs.getString("IncreamentDate"); } } catch(SQLException sqle) { JOptionPane.showMessageDialog(null,"Error! "+sqle); } } } class PayAdmin_DELETEButton1_actionAdapter implements java.awt.event.ActionListener { PayAdmin adaptee; PayAdmin_DELETEButton1_actionAdapter(PayAdmin adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.DELETEButton1_actionPerformed(e); } } class PayAdmin_SEARCHButton2_actionAdapter implements java.awt.event.ActionListener { PayAdmin adaptee; PayAdmin_SEARCHButton2_actionAdapter(PayAdmin adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) {

67

} } class PayAdmin_ADDButton1_actionAdapter implements java.awt.event.ActionListener { PayAdmin adaptee; PayAdmin_ADDButton1_actionAdapter(PayAdmin adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.ADDButton1_actionPerformed(e); } } class PayAdmin_jButton1_actionAdapter implements java.awt.event.ActionListener { PayAdmin adaptee; PayAdmin_jButton1_actionAdapter(PayAdmin adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton1_actionPerformed(e); } } class PayAdmin_SEARCHButton1_actionAdapter implements java.awt.event.ActionListener { PayAdmin adaptee; PayAdmin_SEARCHButton1_actionAdapter(PayAdmin adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.SEARCHButton1_actionPerformed(e); } )

68