Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 27

qwertyuiopasdfghjklzxcvbnmqwertyui

opashjklzxcvbnmqwertyuiopasdfghjkl
COMMON
zxcvbnmqwertyuiopasdfghjklzxcvbnm
qwertyuiopasdfghjklzxcvbnmqwertyui
ASSESSMENT
opasdfghjklzxcvbnmqwertyuiopasdfgh
TASK
jklzxcvbnmqwertyuiopasdfghjklzxcvb
nmqwertyuiopasdfghjklzxcvbnmqwer
tyuiopasdfghjklzxcvbnmqwertyuiopas
COMPUTER STUDIES
dfghjklzxcvbnmqwertyuiopasdfghjklzx
2018
cvbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyuiopasdfghj
Name: Rikansha Ria Kumar
F

klzxcvbnmqwertyuiopasdfghjklzxcvbn
FEMIS ID: 753168

School: Vunimono High


S

mqwertyuiopasdfghjklzxcvbnmrtyuio
School
T
Teacher: Mr.Shivneel
Kumar

pasdfghjklzxcvbnmqwertyuiopasdfghj
753168

klzxcvbnmqwertyuiopasdfghjklzxcvbn
TITLE PAGE

PROGRAMMING
LANGUAGE:
VISUAL BASIC

753168 Page i
AIM & OBJECTIVES
AIM:
The aim of the project is to apply knowledge and skills learnt in CE 12.2.1- Visual Basic.net to
create a payroll system to calculate wages of employees.

OBJECTIVES:
After completing this project i will be able to:

 explain my primary role as a programmer


 use the five steps of the software development, document how each step is carried out:
1. Program Specification
2. Program Design
 Pseudo code
 Flow chart
3. Program Code
4. Program Test
5. Program Documentation
 Create interface which is user friendly with descriptive labelling and company logo.

753168 Page ii
ACKNOWLEDGEMENT

I would like to express my sincere gratitude to the following people for enabling me to be able
to complete the compilation of this task project:

 The Almighty for showering his knowledge and strength on me;


 My parents for helping financially in the completion of this project;
 My sister, Priteshni Kumar, for helping with the typing of the project;
 Mr.Shivneel Kumar, my computer teacher, for his assistance throughout the entire
project.

Signature: Rkumar Date: 23/07/18

753168 Page iii


METHODOLOGY
The following methods were used in obtaining data and information for the completion of this
project.

i. Library
The school library was used to gain some information through reference books such as
encyclopaedia, journals, newspaper, peer reviewed texts.
ii. Internet
The internet was accessed to retrieve information pertaining to the research topic.

753168 Page iv
TABLE OF CONTENT
TITLE PAGE....................................................................................................................................................i
AIM & OBJECTIVES.......................................................................................................................................ii
ACKNOWLEDGEMENT.................................................................................................................................iii
METHODOLOGY..........................................................................................................................................iv
INTRODUCTION...........................................................................................................................................1
PRIMARY ROLE OF A PROGRAMMER...........................................................................................................2
WHAT IS PROGRAMMING?..........................................................................................................................3
STEP 1: PROGRAM SPECIFICATION..............................................................................................................4
STEP 2: PROGRAM DESIGN..........................................................................................................................5
STEP 3: PROGRAM CODE.............................................................................................................................9
STEP 4: PROGRAM TEST.............................................................................................................................11
STEP 5: PROGRAM DOCUMENTATION......................................................................................................14
CONCLUSION.............................................................................................................................................17
REFERENCES..............................................................................................................................................18

753168
INTRODUCTION
In this cutting edge period individuals are searching for more simple way of doing things. For the
efficiency and ease of work many organizations are changing the manual systems to automatic
system, for example payroll software. Payroll software that has transparent way to calculate the
employee wages with proper record. There are many small companies who may not be able to
afford a fully furnished payroll system but do need a software program to at least calculate the
wages of the employees.

Additionally, a Taveuni based company has employed me to develop a computer program that
could calculate wages of workers. As a programmer i am required to use the software development
steps to carry out the job with a user friendly interface. The program will output workers name,
number of hours worked, gross pay and net pay after 8% FNPF deduction.

In this project i will discuss my primary role as a programmer, elaborate five steps of a software
development which are: program specification, program design, program code, program test and
program documentation of how each step is carried out. The interface is to be a user friendly with
descriptive labelling an company logo.

Moreover, i will use visual basic as my programming language to complete this task. VB 1.0 which
was introduced in 1991. The approach for connecting the programming language to the graphical
user interface is derived from a system called Tripod (sometimes also known as Ruby), originally
developed by Alan Cooper and his associates under contract to Microsoft. Its Component Object
Model (COM) programming model first released in 1991 and declared legacy during 2008. The final
release was version 6 in 1998.on April 8, 2008, Microsoft stopped supporting Visual Basic 6.0IDE.
The Microsoft Visual Basic team still maintains compatibility for Visual Basic 6.0 applications on
Windows Vista, Windows Server 2008, Windows 7, Windows 7 and 8. In 2016, visual basic6.0 won
the technical impact award at The 19th Annual D.I.C.E. Awards.

Microsoft intended Visual Basic to be relatively easy to learn and use. It enables the rapid
application development (RAD) of graphical user interface (GUI) applications, access to databases
using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX
controls and objects. Visual basic program a unique computer language which allows you to quickly
and easily develop a bank of visual controls with sliders, switches and meters or a complex form for
a user to fill out. It uses the BASIC language which is known to most computer programmers, and
which can be learned quickly if it is not already known.

753168 Page 1
PRIMARY ROLE OF A PROGRAMMER
Innovation is a lifestyle nowadays as any people get them lost without things, for example, their
PC’s, therefore, it ought nothing to be unexpected that the activity position of computer
programmers is not only one that is high in demand but readily available as well.

Computer programmers write, revise, test, debug, and maintain the programs that instruct
computers how to carry out certain tasks. Programmers write these instructions in coding languages
like Java, Visual Basic or C++, which computers can then follow.

The individual who fulfils the job role of computer programmer is one who writes and develops
various programs relating to their general responsibility of designing computer programs and what
the computer programmer does on a daily basis will depend on the specific job position that is
filled. Some computer programmers will perform one or two specific duties whereas others will
perform many duties in their functions.

Programmers work closely with software developers, and in some businesses, their duties overlap.
When this happens, programmers can do work that is typical of developers, such as designing the
program. This entails initially planning the software, creating models and flowcharts detailing how
the code is to be written, writing and debugging code, and designing an application or systems
interface.

Another general responsibility of a computer programmer is to consult with outside parties in


relation to the construction of computer programming methods and the programs themselves.
Also, to perform monitoring tasks to ensure that the programs which they develop work as they are
supposed to. This is done by reviewing programs on a frequent basis and making adjustments as are
necessary to ensure the proper working of a computer program.

The maintenance of computer databases is another type of specific duty which a computer
programmer may find them responsible.

753168 Page 2
WHAT IS PROGRAMMING?
Programming is coding, modelling, simulating or presenting the solution to a problem, by
representing facts, data or information using pre-defined rules and semantics, on a computer or any
other device for automation.

Computer programming is a process that leads from an original formulation of a computing problem
to executable computer programs. Programming involves activities such as analysis, developing
understanding, generating algorithms, and verification of requirements of algorithms including their
correctness and resources consumption, and implementation of algorithms in a target programming
language.

The purpose of programming is to find a sequence of instructions that will automate performing a
specific task or solving a given problem. The process of programming thus often requires expertise
in many different subjects, including knowledge of the application domain, specialized algorithms,
and formal logic.

Programming (also known as Software Development) is a six step procedure for creating a list of
instructions for the computer to follow (program). Only one of those processes consists of typing
(keying) statements into the computer. The six steps are as follows;

Step 1: Program
Step 1: Program
Specification
Specification

Step
Step 6:
6: Step 2:
Step 2:
Program
Program Program Design
Program Design
Maintenance
Maintenance

Step
Step 5:
5: Step 3:
Step 3:
Program
Program Program Code
Program Code
Documentation
Documentation

Step 4:
Step 4:
Program Test
Program Test

753168 Page 3
STEP 1: PROGRAM SPECIFICATION
Program specification is also called program definition or program analysis. In this step, the
computer programmer has to determine the objectives, outputs, inputs processing requirements
and document them. It requires that the programmer- or you, the end user-to complete tasks
procedures. They are:

1: Program Objectives
The objective of the payroll system is to calculate the normal 40 hours of wages and time and half
for the workers. The program will calculate employee’s gross pay and net pay after 8% FNPF
deduction.

2: Determine the desired output


As a programmer I will develop a software program that should outputs the employees name,
number of hours worked, gross pay and net pay after 8% FNPF deductions.

3: Determine the input data required


The data that would be required to complete this project would be consisting of employee name,
and how many hours worked which would be used to calculate the employee’s gross pay and net
pay.

4: Determining the processing requirements


Gross pay = (number of hours worked less than equal to 40)

Number of hours worked (40) * rate (4.2)

Gross pay = (number of hours worked greater than 40)

(Number of hours worked – 40)* 6.3 + (40 * 4.2)

Net pay = gross pay – (gross pay * 0.08)

5:Documentation
Programs are desired instructions meant to carry out a command. This program calculates the
normal 40 hours and time and half wages of the employee. The user inputs the employees name
and number of hours worked. The desired outputs are employees name, number of hours worked,
gross pay and net pay after 8% FNPF deduction. The processing requirements are if number of hours
worked is less than equal to 40 than gross pay = number of hours worked * rate (4.2), if number of
hours worked is greater than 40 than gross pay =(number of hours worked – 40) * 6.3 + (40 * 4.2)
and net pay = gross pay – (gross pay * 0.08)

753168 Page 4
STEP 2: PROGRAM DESIGN
1. Pseudocode
Also known as Structured English, allows a programmer to use English like sentences to
write an explanations of what the program is supposed to do. The programmer uses certain
keywords in much the same manner as if writing in a structured programming language.

Start procedure
 Input workers name
 Input number of hours worked
Begin

If
Number of hours worked is less than equal to 40 calculate gross pay
= number of hours worked (40) * rate (4.2)
Else
Number of hours worked is greater than 40 calculate gross pay
= (number of hours worked – 40) * 6.3 + (40 * 4.2)
End
Net pay = gross pay – (gross pay * 0.08)

Display – employees name, number of hours worked, gross pay and net pay.

End of procedure

753168 Page 5
2. Flowchart
A flowchart is a diagrammatic representation of a program or a graphic representation of
the steps needed to solve the programming problem. It shows events or actions and the
sequence in which the actions must be taken to correctly solve the problem.

Begin

Enter employee’s name

Enter number of hours worked

Is hours worked > 40?

Yes

No

Gross pay = number Gross pay = (number


of hours worked (40) of hours worked –
* rate (4.2) 40) * 6.3 + (40 * 4.2)

Net pay = gross pay – (gross pay *


0.08)

Display: employees name, hours worked, gross


pay and net pay

End

753168 Page 6
3. Interface

txten
txtnohw PAYROLLSYSTEM PictureBox1
lblen

PAYROLL SYSTEM

EMPLOYEE NAME:

NUMBER OF HOURS WORKED:

lblnohw
CALCULATE

CLEAR

EXIT

btnclear
btncalculate
lbldisplay

btnexit

753168 Page 7
4. Property Settings

Objects Property Setting


Form 1 Text PAYROLL SYSTEM
Name PAYROLLSYSTEM

Label 1 Text Employee name


Name lblen
Label 2 Text Number of hours worked
Name lblnohw
Label 3 Text
Name lbldisplay
Textbox 1 Text
Name txten
Textbox 2 Text
Name txtnohw

Button 1 Text CALCULATE


Name btncalculate
Button 2 Text CLEAR
name btnclear
Button 3 Text EXIT
name btnexit
Picture box 1 image (choose your own picture)
name PictureBox1

753168 Page 8
STEP 3: PROGRAM CODE
Coding is the actual writing of the program by using a programming language.

Some qualities of a good program are:

 It should be reliable i.e. it should work under most conditions


 It should catch obvious and common input errors.
 It should be well documented and understandable by programmers other than the person
who wrote it.

Code for calculate button

PublicClass Form1
'Project: PAYROLL SYSTEM
'Date: 15/06/18
'Programmer: Rikansha Ria Kumar
'Description: This program will calculate the gross pay and net pay for an
employee.

PrivateSub btncalculate_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btncalculate.Click
'declaration of variables
Dim nohw AsDecimal
Dim grosspay AsDecimal
Dim netpay AsDecimal
'declare the constant
Const rate AsDecimal = 4.2
'explicit casting of values from textboxes into integers
nohw = Decimal.Parse(txtnohw.Text)
'calculate gross pay
If nohw <= 40 Then
grosspay = nohw * rate
Else
grosspay = (40 * rate) + ((nohw - 40) * 6.3)
EndIf
'calculate the netpay
netpay = grosspay - (grosspay * 0.08)
'display the gross pay
'display the netpay
lbldisplay.Text = "Employee name:"& txten.Text & vbNewLine &"Number of
hours worked:"& txtnohw.Text & vbNewLine &"Grosspay="&
grosspay.ToString("c") & vbNewLine &"Netpay="& netpay.ToString("c")

EndSub

753168 Page 9
Code for clear button
'To clear the values
PrivateSub btnclear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnclear.Click
'to clear the textbox employee name
txten.Clear()
'to insert the insertion point in the textbox employee name
txten.Focus()
'to clear the textbox number of hours worked
txtnohw.Clear()
'to clear the display label
lbldisplay.Text = ""
EndSub

Code for exit button


'To exit the program
PrivateSub btnexit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnexit.Click
Me.Close()
EndSub

753168 Page 10
STEP 4: PROGRAM TEST

In this step, the program is debugged- tested for syntax and logic errors and these errors corrected.

Bugs
A bug is an error that stops your code working as expected. There are two main types of bug that can occur
in a program:

 Syntax error
This happens when the rules of the language have been broken, example by mis-spelling a
command. Syntax errors usually stop the code from running. Languages like scratch provide code in
ready-written blocks, so you won’t make many syntax errors.

'display the gross pay and net pay


txten.Text

lbldisplay.Text = "Employee name:"& txtem.Text & vbNewLine &


"Number of hours worked:"& txtnohw.Text & vbNewLine &"Grosspay="&
grosspay.ToString("c") & vbNewLine &"Netpay="& netpay.ToString("c")

 Logic error
This means your code runs, but doesn’t do what you expect.

0.08
'calculate the netpay
netpay = grosspay - (grosspay * 0.8)

Finding and fixing these errors in a program is known as debugging.

Testing process
Several methods have been devised for finding and removing syntax and logical errors. They are as follows:

a. Deck checking – I proof read a printout of the program, checking line by line for syntax and logic
errors and making the necessary corrections.

753168 Page 11
b. Manual testing with sample data–both correct and incorrect data is run through the program
manually, not with a computer, to test for correct processing results.

Number of hours worked : 50


Grosspay= (40 * rate ) + ((nohw - 40) * 6.3)
=(40 * 4.2) + ((50 – 40)* 6.3)
=$231.00
Netpay = grosspay – (grosspay * 0.08)number of hours worked : 50
=231.00 – (231.00 * 0.08)gross pay : $231.00
=$212.52net pay : $212.52

Number of hours worked : 55


Grosspay = (40 * rate) + ((nohw – 40) * 6.3)
=(40 * 4.2) + ((55 – 40) * 6.3)
=$262.50
Netpay = grosspay – (grosspay * 0.08)number of hours worked : 55
=262.5 – (262.5 * 0.08)gross pay : $262.50
=$241.50net pay : $241.50

Number of hours worked : 60


Grosspay= (40 * rate) + ((nohw – 40) * 6.3)
=(40 * 4.2) + ((60 – 40) * 6.3)
=$294.00
Netpay = grosspay – (grosspay * 0.08) number of hours worked : 60
=294 – (294 * 0.08)gross pay : $294.00
=$270.48net pay : $270.48

c. Attempt at translation- running a program using a translator program to identify syntax errors.
d. Testing sample data on the computer – sample is used to test the correct execution of each
program statement to check if the correct outputs are delivered by the program.

753168 Page 12
753168 Page 13
e. Testing by a select group of potential users - The program was given to the commercial
department teachers for testing. These feedbacks were used to make final changes to the
program.

STEP 5: PROGRAM DOCUMENTATION


USERS
User manual
One must follow the step by step instruction to be able to run and execute the program.

1. Enter the employees name in the textbox provided.

753168 Page 14
2. Enter the number of hoursworked in the textbox provided.

3. Click on calculate button to calculate the wages for the employee. The program will output
the employees name, number of hours worked, gross pay and net pay after 8% FNPF
deduction.

753168 Page 15
4. Click on clear button to clear the data entered in the textbox and clearthe display label. The
program will be ready for a new set of data entry.

5. Click on exit button tosuccessfully exit or close the program.

753168 Page 16
Programmers- as time passes by, even the creator of the original program may not remember much
about it. Other programmers wishing to update or modify it i.e. perform maintenance, may find
themselves stuck without adequate documentation.

 Remarks were done throughout the project.

CONCLUSION
Certainly, i have gained many things from doing this project. After completing this project i was able to
explain my primary role as a programmer and describe the purpose of programming. Programming basically
involves activities such as analysis, developing, understanding, generating algorithms, and verification of

753168 Page 17
requirements of algorithms including their correctness and resources consumption, and implementation of
algorithms in a target programming language. Computer programmers have many different roles and
responsibilities to fulfil when carrying out their job. They tend to write, revise test, debug, and maintain the
programs that instruct computers how to carry out certain tasks. The number of roles and responsibilities the
computer programmer has rely on what type of position they hold in the organization or company they work
and their individual want to be as well as expected in field.

Moving on, i was able to develop a computer program using visual basic software that can calculate wages of
the workers. As a programmer, i used software development steps which are: program specification,
program design, program code, program test and program documentation to carry out the job with a user
friendly interface. The interface was made user friendly with descriptive labelling to help people understand
the program and assist people who may be involved with the program in the future. The payroll system
outputs the employees name, number of hours worked, gross pay and net pay after 8% FNFP deduction.
Through this project it is evident that proper planning is very important to get the desired outcome.

The computerised payroll system allows a company to process its payroll via dedicated payroll software. A
manual system can result in payroll errors and is usually a slow, laborious process. The computerised system
can offer a number of advantages, including increased accuracy and speed. Being a commerce and computer
student this project helped me to understand the basic knowledge of computer programming thus,
enhancing my skills and capabilities in perusing my future goal. This project has allowed me to learn &
understand elementary programming concepts, think flexibly, determine alternatives, and find new ways to
accomplish a given task. Also, to analyse and use fundamental knowledge to describe things which are
essential and important.

REFERENCES
1. Year 12, technology and employment skills training, ministry of education Fiji: 28 th November
2014.

753168 Page 18
2. PSC. "Visual Basic 6.0 third party components for modern standards (a review)". Planet
Source Code. Retrieved 5 June 2018.

3. Jeff, Martin. "Visual Basic 6 Renewed to Run on Windows 8". INFOQ. Retrieved 6 June 2018.

4. Peter Ware, Phillip Cooke, Dieter Opfer & June Wall, Information and Software Technology 7-
10, Jacaranda, ISBN: 0-7314-0168-9

5. Root, Randal; Romero Sweeney, Mary (2006). A tester's guide to .NET programming. Apress.
p. 3. ISBN 978-1-59059-600-5. You can choose a language based on how easy it is to learn.
For beginners, Visual Basic is a good choice. [~snip] A big advantage of Visual Basic is that it is
a popular language since it is easy to learn.

6. Plants, Robert T.; Murrell, Stephen (2007). An executive's guide to information technology.
Cambridge University Press. p. 343. ISBN 978-0-521-85336-1. Summary of positive issues:
Visual Basic is easy to learn and widely available

7. Dan Hurwitz and Jesse liberty,programming.NET Windows Applications October 2003

8. https://en.wikipedia.org/wiki/Programmer
9. https://www.scribd.com/document/46595072/Primary-Roles-and-Responsibilities
10. https://en.wikipedia.org/wiki/Visual_Basic
11. https://en.wikibooks.org/wiki/Visual_Basic/History
12. https://en.wikiversity.org/wiki/What_is_%22programming%22

753168 Page 19
753168 Page 20
753168 Page 21

You might also like