In this exercise, you modify one of the Seminars applications from Chapter 4’s Apply lesson. Open the Seminars Solution.sln file contained in the Seminars Solution-CheckBox folder. Create an event-handling Sub procedure named ClearAmountDue and associate it with each check box’s CheckChanged event. Then, create a function that determines which (if any) check boxes are selected and then adds the associated fee to the total due. The function should return the total due to the statement that invoked it. Also, make the necessary modifications to the btnCalc_Click procedure’s code. Save the solution and then start and test the application. In VB please.   Code Given:  Option Explicit On Option Strict On Option Infer Off Public Class frmMain Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click ' Calculate and display the amount due. Dim intAmountDue As Integer ' Determine which (if any) check boxes are selected ' and add the associated fee to the amount due. If chkFinance.Checked = True Then intAmountDue = intAmountDue + 150 End If If chkHealth.Checked = True Then intAmountDue = intAmountDue + 125 End If If chkMarketing.Checked = True Then intAmountDue = intAmountDue + 135 End If lblAmountDue.Text = intAmountDue.ToString("C0") End Sub Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub chkFinance_CheckedChanged(sender As Object, e As EventArgs) Handles chkFinance.CheckedChanged lblAmountDue.Text = String.Empty End Sub Private Sub chkHealth_CheckedChanged(sender As Object, e As EventArgs) Handles chkHealth.CheckedChanged lblAmountDue.Text = String.Empty End Sub Private Sub chkMarketing_CheckedChanged(sender As Object, e As EventArgs) Handles chkMarketing.CheckedChanged lblAmountDue.Text = String.Empty End Sub Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub End Class

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In this exercise, you modify one of the Seminars applications from Chapter 4’s Apply lesson. Open the Seminars Solution.sln file contained in the Seminars Solution-CheckBox folder. Create an event-handling Sub procedure named ClearAmountDue and associate it with each check box’s CheckChanged event. Then, create a function that determines which (if any) check boxes are selected and then adds the associated fee to the total due. The function should return the total due to the statement that invoked it. Also, make the necessary modifications to the btnCalc_Click procedure’s code. Save the solution and then start and test the application. In VB please.

 

Code Given: 

Option Explicit On
Option Strict On
Option Infer Off

Public Class frmMain

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
' Calculate and display the amount due.

Dim intAmountDue As Integer

' Determine which (if any) check boxes are selected
' and add the associated fee to the amount due.
If chkFinance.Checked = True Then
intAmountDue = intAmountDue + 150
End If

If chkHealth.Checked = True Then
intAmountDue = intAmountDue + 125
End If

If chkMarketing.Checked = True Then
intAmountDue = intAmountDue + 135
End If

lblAmountDue.Text = intAmountDue.ToString("C0")
End Sub

Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
Me.Close()
End Sub

Private Sub chkFinance_CheckedChanged(sender As Object, e As EventArgs) Handles chkFinance.CheckedChanged
lblAmountDue.Text = String.Empty

End Sub

Private Sub chkHealth_CheckedChanged(sender As Object, e As EventArgs) Handles chkHealth.CheckedChanged
lblAmountDue.Text = String.Empty

End Sub

Private Sub chkMarketing_CheckedChanged(sender As Object, e As EventArgs) Handles chkMarketing.CheckedChanged
lblAmountDue.Text = String.Empty

End Sub

Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub
End Class

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
Data Binding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education