show me the code please with explanition Q1.Design and develop a VB.NET applicat
ID: 3712797 • Letter: S
Question
show me the code please with explanition
Q1.Design and develop a VB.NET application to check whether the user is eligible to vote Alshuwraa council. Application should allow the voter to select the Gender and Age. Eligibility to vote is to be determined based on the age entered by the user. If the age is above 40, All Rights check box has to be selected automatically. If the age is between 18 and 40, Vote check box has to be selected automatically and if the age is less than 18, don't vote check box has to be selected. Formi Age O Less Than 18 Gender Male Female 18-40 Over 40 Eligible Vote Don't vote All rightsExplanation / Answer
Public Class Form1
Dim IntegerValue1 As Double
Dim IntegerValue2 As Double
'function to check the input from the radio button in the form
Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter
'converts the radiobutton value to integer value
If RadioOver40.Checked = True Then
IntegerValue1 = 1
ElseIf RadioLessThan18.Checked = True Then
IntegerValue1 = 2
ElseIf Radio18to40.Checked = True Then
IntegerValue1 = 3
End If
End Sub
'function to select the checkboxes based on the value derived from 'radiobuttons
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.