I'm new in VB programming I did wrote this code so far but for some reason the senior does not calculate. Any help will greatly appreciate. This is what I'm trying to accomplished.
"basic monthly cost of a membership is $100 for adults and $75 for seniors. Members must choose a level of membership { Gold, which adds $300 to the cost of the membership; Silver, which adds $250 to the cost; or Bronze, which adds $150."
Public Class frmMembership
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
' Names
' radAdult
' radSenior
' radGold
' radSilver
' radBronze
' btnCalculate
' txtMthFee
' Variables
Dim fee As Double
Dim adult As Double
Dim senior As Double
' input from the membership
'adult = CDbl(radAdult.Text) ' Monthly Cost
'senior = CDbl(radSenior.Text) ' Monthly Cost
'radAdult.Text = CStr(fee)
fee = CDbl(fee)
' Calculate
' fee = (txtMthFee.Text)
' Function
If radAdult.Checked Then
adult = 100
ElseIf radSenior.Checked Then
senior = 75
End If
' add Monthly Membership
If radGold.Checked Then
fee = adult + 300
ElseIf radSilver.Checked Then
fee = adult + 250
ElseIf radBronze.Checked Then
fee = adult + 150
ElseIf radSenior.Checked Then
fee = senior + 300
ElseIf radSenior.Checked Then
fee = senior + 250
ElseIf radSenior.Checked Then
fee = senior + 150
End If
' Display output
txtMthFee.Text = CStr(fee)
End Sub
End Class