Home    FAQ   COU   Members List   Calendar   Search   


Go Back   Omgasl > OzClans Hosted Clans > [zero] Clan Zero > [ Zero ] General Chat
User Name
Password
 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 22-06-2005, 10:29 AM
pepsimax pepsimax is offline
pepsimax's Avatar
Registered User
Join Date: Feb 2003
Posts: 7
Default Visual Basic Help

i need help to change everything, this is just a template how to work a calculator of some sort can anybody help me?

Design Specification:

A local motorcycle business, Choppers Inc., has had a revival over recent years with many baby boomers deciding that they want to get back on bikes and enjoy life. This fact has changed the way that Choppers Inc does business. They used to be a very small backyard business that did custom modifications on older bikes. Essentially the owners of Choppers Inc. knew the bikers who required the modifications to their bikes. Everything including quotes and payments were done by word of mouth and it all worked well.

However, the business cannot cope with this way of operating anymore. Bucket, the owner of Choppers Inc., has asked you at IT Kids to come up with a business solution for them. This solution will include quotes, stock control, paying employees, and invoicing. This is a big project.



However, even though Bucket knows you through one of his employees, Spanner, he needs to be sure you can produce a solution that will meet his needs. To this end Choppers Inc. has asked you to produce the payroll module for their business. The payroll needs to have the following features:

Data entry of the employee’s name and the hours they worked for that week. If you choose to do so, you can also enter the pay rate for that employee. The name could be selected from a list, if you choose to do so. There is no overtime. If they type in their name, then an existence check must be performed to ensure that something is entered. The hours worked must also be type checked to insure that only numbers can be entered.



The program will use the input data to:

· Calculate the gross weekly wage of the employee using the employee pay rates given.

· Deduct the 8% superannuation amount from the gross weekly wage

· Calculate the weekly tax paid on the remainder using the data in the supplied tax table

· Calculate the net weekly wage.

· Display the employees name, weekly hours worked, hourly pay rate, weekly gross pay, weekly superannuation deduction, weekly tax deduction and weekly net wage.

· Be able to calculate the wages of all 5 employees, one after the other, i.e., you do not have to restart the program each time you calculate a person’s pay.



Taxable Income

Tax Payable

$0 – $6,000

Nil

$6,000.01 – $20,000

17c for each $1 over $6,000

$20,000.01 - $50,000

$2,380 plus 30c for each $1 over $20,000

$50,000.01 – $60,000

$11,380 plus 42c for each $1 over $50,000

Over $60,000

$15,580 plus 47c for each $1 over $60,000



Superannuation is calculated at 8% of gross for each employee. That is, all employees have asked that 8% of their pay be deducted from their gross salary as part of their pay package.

Employee data

Max Driver (apprentice) $18 per hour

James Wheel-Cover $25 per hour

Spanner Turner $27.50 per hour

Anne Tyre $25 per hour

Lyle Scooter (apprentice) $18 per hour



Programming Task



From the design specification you are required to complete the following tasks:
  • Produce a complete algorithm of the module that you are required to program using Pseudocode or a Flowchart or a N-S Diagram. This must be produced and submitted before coding can commence.
  • Create a Data Table showing the data structures that are to be used in your program.
Data Item

Description

Format

Data Type









  • Write the project for the Design Specification using Visual Basic 6. All of the files that make up your project are to be in your F: drive network folder in a sub folder “U3O3”.
  • Ensure that the code for your program is fully internally documented.
  • You must demonstrate that the validation works, via screen dumps.
  • You must also produce a test table to demonstrate that your program, calculates the tax and net wage correctly, for the $0 – $6,000 bracket, $6,000.01 – $20,000 bracket and for the
    $50,000.01 – $60,000 bracket. Use a Test Table as shown below.

=-----------------------------------------------------------------------------------

here is my start but needs to be changed....


Option Explicit
Dim employee As String
Dim hw As Integer
Dim npay As Currency
Dim grosspay As Currency
Dim TI As Currency
Dim super As Currency
Dim tax As Currency
Dim NetPay As Currency
Dim payrate As Currency


Private Sub Calculate_Click()
calculategrosspay
calculateSuper
calculateTax
calculateTI
NetPay = (TI - tax) / 52
txtnpay.Text = Format(Val(NetPay), "currency")
End Sub
Public Sub calculateTax()
If TI * 52 <= 6000 Then
tax = 0
Else
If TI * 52 <= 20000 Then
tax = (((TI) * 52 - 6000) * 0.17) / 52
Else
If TI * 52 <= 50000 Then
tax = 2380 + (((TI) * 52 - 20000) * 0.3) / 52
Else
If TI * 52 <= 60000 Then
tax = 11380 + (((TI) * 52 - 50000) * 0.42) / 52
Else
tax = 15580 + (((TI) * 52 - 60000) * 0.47) / 52
End If
End If
End If
End If
txttax.Text = Format(tax, "currency")
End Sub
Private Sub END_Click()
End
End Sub
Private Sub New_Click()
txtemployee.Text = ""
txthw.Text = ""
txtNetPay.Text = ""
txtPR.Text = ""
txtsuper.Text = ""
txttax.Text = ""
txtGP.Text = ""
txtemployee.SetFocus
End Sub
Public Sub calculateGP()
GP = Val(payrate.Text) * Val(hw.Text)
txtGP.Text = Format(GP, "currency")
End Sub
Public Sub calculateTI()
TI = (GP - super) * 52
End Sub
Public Sub calculateSuper()
super = GP * 0.08
txtsuper.Text = Format(super, "currency")
End Sub


Private Sub Print_Click()
hw = txthw.Text
Printer.FontName = "times new roman"
Printer.FontSize = "12"
Printer.Print "", "Choppers Inc. Payroll"
Printer.Print
Printer.Print "", "Employee Payslip", "", Date
Printer.Print
Printer.Print "", employee; Name
Printer.Print
Printer.Print "Hours", "Pay", "Superannuation", "Tax", "NetPay"
Printer.Print
Printer.Print hw, Format(Val(NPR), "currency"), Format(Val(super), "currency"), Format(Val(tax), "currency"), "", "", Format(Val(NetPay), "currency")
Printer.EndDoc
End Sub
Private Sub txtNetPay_Change()
txtNetPay = GP - tax - super
End Sub

Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 07:32 AM.


Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.