JakeDay's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
13 (0.01 per day)
Joined:
01-April 11
Profile Views:
1,074
Last Active:
User is offline Nov 23 2012 07:25 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   JakeDay has not set their status

Posts I've Made

  1. In Topic: Withdraw and deposit

    Posted 23 Nov 2012

    I get a squiggly line underneath this statement account.deposit and I dont know why? It says reference to a non-shared memeber requires an object reference

    Sorry it says Deposit is not a member of decimal.
  2. In Topic: Displaying a list in Reverse order

    Posted 2 Oct 2012

    And how would I do that? I would look in my book but I am missing 50 pages lol and those 50 pages are the pages I need.
  3. In Topic: Computing Weekly Gross Pay

    Posted 13 Sep 2012

    I dont want to get rid of everything that I have done so far. What would be the best thing to do and what should I delete?
  4. In Topic: Computing Weekly Gross Pay

    Posted 13 Sep 2012

    Public Class Form1
    
        Private Sub exitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitButton.Click
            Me.Close()
        End Sub
    
        Private Sub clearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clearButton.Click
    
            HourlyRateTextBox.Clear()
            HoursWorkedTextBox.Clear()
            GrossPayTextBox.Clear()
            SalariedCheckBox.Checked = False
    
        End Sub
    
        Private Sub CalculateGrossPay(ByVal hourlyrate As Decimal, _
                                     ByVal hoursworked As Decimal, _
                                     ByVal salaried As Decimal, _
                                     ByRef grosspay As Decimal)
    
            For index As Integer = 1 To grosspay
    
            Next
            grosspay = hourlyrate * hoursworked
    
            If hoursworked > 40 Then
                grosspay = hoursworked * hourlyrate _
                    + (hoursworked - 40) * hourlyrate * 0.5
            End If
    
            
        End Sub
    
        'Private Function GrossPay(ByVal hourlyrate As Decimal,
        '                             ByVal hoursworked As Decimal,
        '                            ByVal salaried As Decimal) _
        '                           As Decimal
    
        '    For i As Integer = 1 To salaried
        '       GrossPay = hoursworked * hourlyrate
        '  Next
    
        '    If hoursworked > 40 Then
        '       GrossPay = hoursworked * hourlyrate _
        '          + (hoursworked - 40) * hourlyrate * 0.5
        ' End If
    
        '    Return GrossPay
    
        'End Function
    
        Private Sub ProcedureButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProcedureButton.Click
            Dim hourlyrate As Decimal = CDec(HourlyRateTextBox.Text)
            Dim hoursworked As Decimal = CDec(HoursWorkedTextBox.Text)
            Dim grosspay As Decimal
            Dim salaried As Decimal
    
            Me.CalculateGrossPay(hourlyrate, hoursworked, salaried, grosspay)
    
            GrossPayTextBox.Text = FormatCurrency(grosspay)
            GrossPayTextBox.Select()
    
            If Salary() Then
                hourlyrate = CInt(HourlyRateTextBox.Text)
                grosspay = hourlyrate * 40
    
                CalculateGrossPay(hourlyrate, hoursworked, salaried, grosspay)
                GrossPayTextBox.Text = FormatCurrency(grosspay)
            End If
    
    
    
        End Sub
    
        Private Sub FunctionButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FunctionButton.Click
           
            Dim hourlyrate As Integer
            Dim grosspay As Decimal
    
            If Salary() Then
                hourlyrate = CInt(HourlyRateTextBox.Text)
                grosspay = hourlyrate * 40
                GrossPayTextBox.Text = FormatCurrency(grosspay)
            End If
    
    
        End Sub
    
       
        Private Function Salary() As Boolean
    
            Dim hourlyrate As Integer
            Dim grosspay As Decimal
    
            If SalariedCheckBox.Checked Then
                grosspay = hourlyrate * 40
            End If
            Salary = True
        End Function
       
    
    End Class
    
    



    This is what I added from the previous code. When I check the salary box I get a different answer for the procedure and the function and the exact same thing when I dont check the salary box. The function and procedure should be $475 should be the gross pay when you dont check the salary box and $400 when you do check the salary box. What I am having trouble is figuring out the not salaried function button and the procedure salaried button. When you check the salary box the function button and the procedure button should be the same and the when you dont check the salary box the function and procedure button should also be the same number.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Comments

JakeDay has no profile comments yet. Why not say hello?