Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago