I am working on a homework assignment and have been hashing it out for days. Hopefully my novice status with this wears off soon. I am supposed to create an ISP calculator with checked radio buttons and the user enters the hours.
Package A = $9.95 for 10 hours each hour after that is $2/hour
Package B = $14.95 for 20 hours each hour after that is $1/hour
Package C = $19.95 unlimited monthly access.
Max hours to be used is 744 hours per month.
I've tried everything I can think of and I have no idea where I am going wrong and our instructor doesn't respond to emails and I am taking this course online. Any tips or help would be appreciated. I don't expect anyone to do my homework by any means but I have no idea what I am doing wrong. When I debug for package A it just tells me that it's $9.95 no matter how many hours I input and for package B it tells me $0.00 but the codes are the same.
Private Sub btnCalculate_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim decCharges As Decimal
Dim intHours As Integer
Const decA As Decimal = 9.95D
Const decB As Decimal = 14.95D
Const decC As Decimal = 19.95D
inthours = CInt(txtHours.Text)
If radA.Checked = True then
If intHours >= 10 then
decCharges = decA
Else
If intHours <10 and intHours >744 then
decCharges = intHours * 2
End if
End If
If radB.Checked = True then
If intHours >= 20 then
decCharges = decB
Else
If IntHours <10 and intHours > 744 then
DecCharges = intHours *2
End If
End If
End If
End If
If radC.Checked = True then
If intHours >= 744 then
decCharges = decC
End If
End If
lblTotal.Text = decCharges.ToString("c")
End Sub