I'm writing a program to calculate internet charges. Three packages, A, B, and C to choose from costing $9.95(10 hours; $2/hour extra), $14.95(15 hours; $1/hour extra) and $19.95(unlimited).
Here is the code I have written for input from masked text boxes (for just one case). I would like to simplify by using check boxes and radio buttons but I have never used them before. Any hints or tips?
Case "A"
If hours < 10 And nonprofit.ToUpper = "Y" Then
lstOutput.Items.Add("Total Cost is " & FormatCurrency(9.95 * 0.8))
'package A with nonprofit status, under limit
ElseIf hours < 10 And nonprofit.ToUpper = "N" Then
lstOutput.Items.Add("Total Cost is " & FormatCurrency(9.95))
'package A without nonprofit status, under limit
ElseIf hours > 10 And nonprofit.ToUpper = "Y" Then
lstOutput.Items.Add("Total Cost is " & FormatCurrency((9.95 + _
(hours - 10) * 2) * 0.8))
'package A with nonprofit status, over limit
ElseIf hours > 10 And nonprofit.ToUpper = "N" Then
lstOutput.Items.Add("Total Cost is " & FormatCurrency(9.95 + _
(hours - 10) * 2))
'package A without nonprofit status, over limit
End If
Thanks