Question Please Help - school assignment

nicole200718

Active member
Joined
Feb 2, 2011
Messages
35
Programming Experience
Beginner
I am so new at this and not sure what to all put in the button calc??


' Glasgow Health Project
' The project calculates a member's monthly dues.

Option
ExplicitOn
Option
StrictOn

PublicClass frmMain

PrivateSub btnExit_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
EndSub

PrivateSub btnCalc_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btnCalc.Click
' calculates the monthly dues, which include
' a basic fee and optional charges
Const cintSingleBasicFee AsInteger = 50
Const cintFamilyBasicFee AsInteger = 90
Const cintSingleTennisFee AsInteger = 30
Const cintSingleGolfFee AsInteger = 25
Const cintSingleRacquetFee AsInteger = 20
Const cintFamilyTennisFee AsInteger = 50
Const cintFamilyGolfFee AsInteger = 35
Const cintFamilyRacquetFee AsInteger = 30

' Create a new class called clsDues:confused:
' Setup the class variables
' Setup the class Constructors
' Setup the class methods
' Setup the class properties

' determine which radio button is checked:confused:
' and which check boxes (if any) are
' checked(6pts) and total the values into the Dues object

' display the basic, additional, and total fees using the Dues object

EndSub

PrivateSub rdoFamily_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles rdoFamily.Click
lblBasicOutput.Text = String.Empty
lblAdditionalOutput.Text = String.Empty
lblDuesOutput.Text = String.Empty
EndSub

PrivateSub rdoSingle_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles rdoSingle.Click
lblBasicOutput.Text = String.Empty
lblAdditionalOutput.Text = String.Empty
lblDuesOutput.Text = String.Empty
EndSub

PrivateSub chkGolf_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles chkGolf.Click
lblBasicOutput.Text = String.Empty
lblAdditionalOutput.Text = String.Empty
lblDuesOutput.Text = String.Empty
EndSub

PrivateSub chkRaquet_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles chkRacquet.Click
lblBasicOutput.Text = String.Empty
lblAdditionalOutput.Text = String.Empty
lblDuesOutput.Text = String.Empty
EndSub

PrivateSub chkTennis_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles chkTennis.Click
lblBasicOutput.Text = String.Empty
lblAdditionalOutput.Text = String.Empty
lblDuesOutput.Text = String.Empty
EndSub

EndClass
 
Last edited:
' Create a new class called clsDues
' Setup the class variables
' Setup the class Constructors
' Setup the class methods
' Setup the class properties

Class:

VB.NET:
Public Class clsDues
End Class

Contstructor (Overloadable and can accept parameters):

VB.NET:
Public Sub New()
End Sub

Methods,Properties,etc.:
VB.NET:
Public Function GetAmount() as Double
Return _amt
End Function
Public ReadOnly Property Amount() as Double
Get
Return _amt
End Get
End Property
Public _amt as Double
Public Sub New()
End Sub
Public Sub New(amt as double)
_amt = amt
End Sub

Have clsDues instance be an object of frmMain and update its contents as the user interacts with the form.

VB.NET:
Public cd as New clsDues
 
Back
Top