This is the problem I am working on ( you have likely seen it before)
A bank charges $10 per month, plus the following check fees for a commercial
checking account:
$0.10 each for less than 20 checks
$0.08 each for 20 through 39 checks
$0.06 each for 40 through 59 checks
$0.04 each for 60 or more checks
Create an application that allows the user to enter the number of checks written.
The application should compute and display the bank’s service fees for the month.
All checks for the month are assigned the same charge, based on the total number of
checks written during the month.
Input validation: Do not accept a negative value for the number of checks written.
Ensure that all values are numeric. The Clear button must clear the text box and the
label that displays the monthly service charge.
Use the following test data to determine if the application is calculating properly. In
each case, the customer is charged only a single rate, based on the total number of
checks:
I am attempting right now to do the calculation part of the problem and thus far what I am getting is something like this
Type value into a textbox and then the program attempts to calculate the problem well i get no calculation , all it does is insert 0's into both the textbox and the label. I think I am perhaps missing something simple here to have it calculate correctly , any help or insight would be appreciated .
Dim checks As Double
Dim Fee As Double
Dim Q As Integer
If checks < 20 Then
Fee = checks * 0.1
ElseIf checks < 39 Then
Fee = checks * 0.08 + 1.9
ElseIf checks < 59 Then
Fee = checks * 0.8 + 1.9
ElseIf checks < 60 Then
Fee = checks * 0.8 + 1.9
End If
Q = CDbl(TextBox1.Text) * (Fee)
TextBox1.Text = checks
Label3.Text = CStr(Q)