Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Who can help write Visual Basic code for this problem. Please clarify all labels

ID: 3675295 • Letter: W

Question


Who can help write Visual Basic code for this problem. Please clarify all labels and text box control names. Thanks

Quanti 10 through 19 20 through 49 50 through 99 100 or more 20% 30% 40% 50% tach case, the customer is Number of Checks e number of units sold for each enter the number of un ate an application that allows the user to software package. The application's form should resemble Figure 4-37. 15 25 45 75 . Shipping Charges Figure 4-37 Software Sales form The Fast Freight Shippin Weight of the Package (in 2 kg or less Over 2 kg, but not more Over 6 kg, but not more Over 10 kg, but not mo Create an application th distance it is to be shipp Irput ualidatione Do n Do not accept weight company will ship. D 3000 miles. These are Suggestion: use the o check for package we to check for nonnum Use the following test Weight and Distance 1.5 Kg, 100 miles 5 Kg, 200 miles 8 Kg, 750 miles 15 Kg, 2000 miles Quartty Sold Package A 15 Package B 75 Package C 120 Package A: $1.183 00 Package & $8.965.00 Package C $17 940 0 Grand Total: $28 08300 Jear The application should calculate and display the order amounts and the grand total in a Label control. The Clear button must clear all text boxes and calculated labels. The Exit button must close the windo Input validation: Make sure the number of units for each package is numeric, and is not negative. Use the following test data to determine if the application is calculating properly: Units Sold Package A: 15 units Package B: 75 units Package B $8,955.00 Package C: 120 unitsPackage C: $17,940.00 Speed of Sound The following table Medium Air Water Steel 8. Amount of Order Package A: $%1,188.00 Grand Total: $28,083.00 Create an applicatio water, or steel. Prow travel in the selected display the amount Input ralidatior D data. Design Your Own Forms 6. Bank Charges A bank charges $10 per month, plus the following check fees for a commercial checking account:

Explanation / Answer

Answer:

VB Code:

Public Class SoftwareSalesForm

    Const decPackageACost As Decimal = 99

    Const decPackageBCost As Decimal = 199

    Const decPackageCCost As Decimal = 299    

private Sub Calculate_Click(ByVal sender As Object,ByVal e as EventArgs) Handles Calculate.Click

        Dim PackageASold As Integer     

        Dim PackageBSold As Integer     

        Dim PackageCSold As Integer

          Dim PackageACost As Decimal

          Dim PackageACost As Decimal

          Dim PackageACost As Decimal    

        Dim GrandTotal As Decimal   

        Dim Discount As Decimal

       

        Try

            PackageASold = CInt(txtPgeA.Text)

            PackageBSold = CInt(txtPgeB.Text)

            PackageCSold = CInt(txtPgeC.Text)

        Catch exp As Exception

     'show error msg

            MessageBox.Show("input must be numeric")

            Return

      End Try

       'check for positive value

        If (PackageASold < 1) Then

            MessageBox.Show("input should be positive")

            Return

        End If

      

        If (PackageBSold < 1) Then

            MessageBox.Show("input should be positive")

            Return

        End If

      

        If (PackageCSold < 1) Then

            MessageBox.Show("input should be positive")

            Return

        End If

    

     If PackageASold>9 And PackageASold<20 Then

                PackageACost = PackageASold * decPackageACost- PackageASold * decPackageACost*0.2

        ElseIf PackageASold>19 And PackageASold<50 Then

                PackageACost = PackageASold * decPackageACost- PackageASold * decPackageACost*0.3

        ElseIf PackageASold>49 And PackageASold<100 Then

                PackageACost = PackageASold * decPackageACost- PackageASold * decPackageACost*0.4

        ElseIf PackagABSold >=100

                PackageACost = PackageASold * decPackageACost- PackageASold * decPackageACost*0.5

         End If

        If PackageBSold>9 And PackageBSold<20 Then

                PackageBCost = PackageBSold * decPackageBCost- PackageBSold * decPackageBCost*0.2

        ElseIf PackageBSold>19 And PackageBSold<50 Then

                PackageBCost = PackageBSold * decPackageBCost- PackageBSold * decPackageBCost*0.3

        ElseIf PackageBSold>49 And PackageBSold<100 Then

                PackageBCost = PackageBSold * decPackageBCost- PackageBSold * decPackageBCost*0.4

        ElseIf PackageBSold >=100

                PackageBCost = PackageBSold * decPackageBCost- PackageBSold * decPackageBCost*0.5

        End If

        If PackageCSold>9 And PackageCSold<20 Then

                PackageCCost = PackageCSold * decPackageCCost- PackageCSold * decPackageCCost*0.2

        ElseIf PackageCSold>19 And PackageCSold<50 Then

                PackageCCost = PackageCSold * decPackageCCost- PackageCSold * decPackageCCost*0.3

       ElseIf PackageCSold>49 And PackageCSold<100 Then

                PackageCCost = PackageCSold * decPackageCCost- PackageCSold * decPackageCCost*0.4

        ElseIf PackageCSold >=100

                PackageCCost = PackageCSold * decPackageCCost- PackageCSold * decPackageCCost*0.5

        End If

    

        GrandTotal=PackageACost+PackageBCost+PackageCCost

     label4.Text="Package A:$"&PackageACost.ToString()& system.environment.newline &"Package B:$"&PackageBCost.ToString()& system.environment.newline &"Package C:$"&PackageCCost.ToString()& system.environment.newline &"Grand Total:$"&GrandTotal.ToString();

End Sub

private Sub Clear_Click(ByVal sender As Object,ByVal e as EventArgs) Handles Clear.Click

     txtPgeA.Text=""

     txtPgeB.Text=""

     txtPgeC.Text=""

     label4.Text=""

End Sub

private Sub ClearBtnA_Click(ByVal sender As Object,ByVal e as EventArgs) Handles ClearBtnA.Click

     SoftwareSalesForm .close()

End Sub 'end function

End Class 'class end