Commission based pay calculator in vb.net

I need to know how to create a pay calculator that adds in a certain a

Page 1 of 1

1 Replies - 6955 Views - Last Post: 28 January 2010 - 08:32 PM Rate Topic: -----

#1 kweef19  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 108
  • Joined: 19-January 10

Commission based pay calculator in vb.net

Post icon  Posted 28 January 2010 - 08:08 PM

okay so I had a project for school this week to make a pay calculator for a commission based worker I designed what I think it should look like in vb.net and I started to get ready to write the code and I started reading the info given in the book and it doesn't even give a range of hours worked :v: . This may just be my terrible mathematics, but I do not see how I can possibly design a pay calculator if I do not know how much the person is getting paid by the hour. Are there any thoughts on this? Here is the code I have written so far.
Public Class Form1

	Private Sub PayToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PayToolStripMenuItem.Click
		'Calculates and displays  the commission and the total pay  for that person.

		Dim TotSaleTxtbox As Double
		Dim TotComTxtbox As Double
		Dim WeekQuotaTxtbox As Double

		If WeeklySaleTxtbox >= WeekQuotaTxtbox Then
			TotComTxtbox = 0.15
		Else


		End If
	End Sub

	Private Sub SummaryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SummaryToolStripMenuItem.Click
		'Displays a message-box that holds total sales, total commissions, and total pay for all salespersons.
		'Displays the numbers with two decimal places and dollar signs.

		Dim TotSaleTxtbox As Double
		Dim TotComTxtbox As Double

	End Sub

	Private Sub ClearToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearToolStripMenuItem.Click
		'Clears the name, sales, and pay for the current employee and then resets the focus.
	End Sub

	Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click
		'Should change the font of the information displayed in the total pay text box.
	End Sub

	Private Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click
		'Should change the color of the information displayed in the total pay text box.

	End Sub

	Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
		'Should display Program name and Programmer name in a message box.
	End Sub
End Class

I know the code is basically hollow but that is only because I truly do not believe that this assignment can be completed successfully.
Any help is greatly appreciated. :stupid:

Is This A Good Question/Topic? 0
  • +

Replies To: Commission based pay calculator in vb.net

#2 LeisureProgrammer  Icon User is offline

  • N00by VB.NET Developer
  • member icon

Reputation: 110
  • View blog
  • Posts: 588
  • Joined: 06-September 09

Re: Commission based pay calculator in vb.net

Posted 28 January 2010 - 08:32 PM

Quote

This may just be my terrible mathematics, but I do not see how I can possibly design a pay calculator if I do not know how much the person is getting paid by the hour.


If you knew how much the person was getting paid per hour - then, could you design a pay calculator?

The solution may be to just ask the user how much he is getting paid per hour, and use that.
Something like this:
dim howMuchHeMakesPerHour as integer = inputbox("how much do you make per hour")
'now use this integer to calculate it



This post has been edited by LeisureProgrammer: 28 January 2010 - 09:20 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1