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

Anna University Practical Examination November - December 2020

Register Number: Name:


College Code: 1128 College Name: T.J.S Engineering
College
Subject Code:CS8582 Subject Name: Object Oriented
Analysis and Design Laboratory
Date: 21/12/2020 Session: FN/AN

Question:

Develop UML diagram for implementing Payroll System


AIM:
To analyze, design and develop code for Payroll system using Rational Rose software.
PROBLEM STATEMENT
To compute the gross pay of a person using the Payroll system software and to add new
details to the existing database and update it, using visual basic 6.0 and MS Access
OVERALL DESCRIPTION
The three modules are
1) Entry form: The employee details, edit details and exit command buttons are present. We
can choose the required command button.
2) Pay slip form: Fill in the form with details such as employee id, employee name, department,
experience, and basic pay in the text boxes and submit using CALCULATE command button
Update it in the database using UPDATE command button.
3) Database form: Updated database would be present. We can search for the required Pay
details using SEARCH command button

SOFTWARE REQURIEMENTS:
 Microsoft Visual Basic 6.0
 Rational Rose
 Microsoft Access.
HARDWARE REQURIMENTS:

128MB RAM


Pentium III Processor
USECASE DIAGRAM
CLASS DIAGRAM
ACTIVITY DIAGRAM

Payroll

Employee Salary

Detail

Emp payroll Official detail Basic PF Other


SEQUENCE DIAGRAM

Employee System Employee


Database
Login

Valid

Enter Employee Details

Store In Database

Return Details

Display details

Ask For Salary Slip

Ask For Basic Pay,PF

Return Details

Calculate & Display Salary

Exit
COLLABRATION DIAGRAM

1: Login

3: Enter Employee Details


7: Ask For Salary Slip

Employee System

2: Valid

6: Display details

10: Calculate & Display Salary


11: Exit

5: Return Details

9: Return Details

4: Store In Database
8: Ask For Basic Pay,PF

Employee
Database

COMPONENT DIAGRAM

Employee PayRoll Database

DEPLOYMENT DIAGRAM:

Employee Access
PayRoll
Databe
System
IMPLEMENTATION:

Form1:

Private Sub Command1_Click()


Dim a As Boolean
a = False

If (Text1.Text = "admin" And Text2.Text = "admin") Then


a = True
Form2.Show
Unload Me
End If

If (a = False) Then
MsgBox ("Enter Correct Username and Password")
End If
End Sub

Form2

Private Sub Command1_Click()


Form3.Show
Unload Me
End Sub
Private Sub
Command2_Click()
Form4.Show
Unload
Me End
Sub

Private Sub
Command3_Click()
Form5.Show
Unload
Me End
Sub

Private Sub
Command4_Click() Unload
Me
End Sub

Form3

Private Sub Command1_Click()


Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim a As Boolean

a = False

cn.Open "dsn=payroll"
rs.ActiveConnection =
cn

With rs

.CursorType = adOpenStatic

.CursorLocation = adUseClient

.LockType = adLockOptimistic.Open "select * from Details" End With

rs.MoveFirst
While Not rs.EOF

If (Val(Text1.Text) = rs(0))
Then Text2.Text = rs(1)
Text3.Text = rs(2)
Text4.Text = rs(3)
Text5.Text = rs(4)
Text6.Text = rs(5)
Text7.Text = rs(6)
Text8.Text = rs(7)

a = True
End If
rs.MoveNe
xt Wend

If (a = False) Then

MsgBox ("Enter correct


ID") End If

End Sub
Private Sub
Command2_Click()
Form2.Show

Unload
Me End
Sub

Private Sub
Command3_Click() Unload
Me

End Sub

Form4
Private Sub Command1_Click()

Dim cn As New ADODB.Connection


Dim rs As New ADODB.Recordset

cn.Open "dsn=payroll"
rs.ActiveConnection =
cn

With rs

.CursorType = adOpenStatic

.CursorLocation = adUseClient

.LockType = adLockOptimistic

.Open "select *
from Details" End
With

With rs

.AddNew
.Fields(0) = Text1.Text

.Fields(1) = Text2.Text

.Fields(2) = Text3.Text

.Fields(3) = Val(Text4.Text)

.Fields(4) = Val(Text5.Text)

.Fields(5) = Val(Text6.Text)

.Fields(6) = Val(Text7.Text)

.Fields(7) = Val(Text8.Text)

.Update
End With

Text1.Text =
"" Text2.Text
= ""
Text3.Text =
"" Text4.Text
= ""
Text5.Text =
"" Text6.Text
= ""
Text7.Text =
"" Text8.Text
= "" End Sub

Private Sub
Command2_Click()
Form2.Show

Unload
Me End
Sub

Private Sub
Command3_Click() Unload
Me

End Sub

Private Sub Text3_Change()


Text4.Text = Val(Text3.Text) * 0.25
Text5.Text = Val(Text3.Text) * 0.1
Text6.Text = Val(Text3.Text) * 0.12

Text8.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) - Val(Text6.Text) +


Val(Text7.Text)

End Sub

Form5

Private Sub Command1_Click()

Dim cn As New ADODB.Connection


Dim rs As New ADODB.Recordset
Dim a As Boolean

a = False

cn.Open "dsn=payroll"
rs.ActiveConnection =
cn
With rs.CursorType = adOpenStatic.CursorLocation = adUseClient.LockType =
adLockOptimistic

.Open "select *
from Details" End
Withrs.MoveFirst
While Not rs.EOF
If (Val(Text1.Text) = rs(0))
Then rs.Delete
rs.Upde
= True
End If

rs.MoveNe
xt Wend

If (a = False) Then

MsgBox ("Enter correct ID") End If

End Sub

Private Sub
Command2_Click()
Form2.Show

Unload
Me End
Sub

Private Sub
Command3_Click() Unload
Me

End Sub

RESULT:

This project was carried out in a sequential manner to design and implement the
“Payroll System”. Thus the outcome of the project is efficient. The Payroll System caters the
varied requirements of the user to perform various options.

Вам также может понравиться