Question: Could someone translate this VB code to structured english? (i.e. declare mailbox) 1.Private Sub btnCompute_Click(sender As Object, e As EventArgs) Handles btnCompute.Click 2. Dim oldBalance,

Could someone translate this VB code to structured english? (i.e. declare mailbox)

1.Private Sub btnCompute_Click(sender As Object, e As EventArgs) Handles btnCompute.Click 2. Dim oldBalance, charges, credits, newBalance, minPayment As Double 3. InputData(oldBalance, charges, credits) 4. CalculateNewValues(oldBalance, charges, credits, newBalance, minPayment) 5. DisplayData(newBalance, minPayment) 6.End Sub 7.Sub InputData(ByRef oldBalance As String, ByRef charges As String, ByRef credits As String) 8. oldBalance = CDbl(txtOldBal.Text) 9. charges = CDbl(txtCharges.Text) 10. credits = CDbl(txtCredits.Text) 11.End Sub 12.Sub CalculateNewValues(ByRef oldBalance As Double, ByRef charges As Double, ByRef credits As Double, ByRef newBalance As Double, ByRef minPayment As Double) 13. Dim rate As Double = 1.015 14. newBalance = (rate * oldBalance) + charges - credits 16. If newBalance <= 20 Then 17 minPayment = newBalance 18 Else 19 minPayment = ((newBalance - 20) * 0.1) + 20 20 End If 21.End Sub 22.Sub DisplayData(newBalance As Double, minPayment As Double) 23. lblMinPay.Text = minPayment.ToString("C") 24. lblNewBal.Text = newBalance.ToString("C") 25.End Sub 26.End Class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!