Explanation of Solution
Program
Public Class frmMain
'Declaring variables of type double and initializing with values
'variable twin
Dim twin As Double = 39.99
'variable full
Dim full As Double = 49.99
'variable queen
Dim queen As Double = 49.99
'variable king
Dim king As Double = 69.99
'variable totalCost
Dim totalCost As Double = 0
'variable shippingFee
Dim shippingFee As Double
'calculating total cost after clicking on button
Private Sub btnCost_Click(sender As Object, e As EventArgs) Handles btnCost.Click
'displaying total cost in textbox and Math.Round() is used to round the totalcost to two decimal places
txtCost.Text = String.Format("$" + Math.Round((totalCost + shippingFee), 2).ToString())
End Sub
'exit button click
Private Sub btnExit_Click (sender As Object, e As EventArgs) Handles btnExit.Click
Application.Exit()
End Sub
'checkbox CheckedChanged() event
Private Sub chkpickup_CheckedChanged(sender As Object, e As EventArgs) Handles chkpickup.CheckedChanged
'if checkbox is checked then
If (chkpickup.Checked = True) Then
'assign the shipping fee to the variable shippingFee
shippingFee = 5
Else
'else shippingFee is zero
shippingFee = 0
End If
End Sub
'radio button twin CheckedChanged() event
Private Sub rbtTwin_CheckedChanged(sender As Object, e As EventArgs) Handles rbtTwin.CheckedChanged
'if radio button is changed the clear values from textbox
txtCost.Text = ""
If (rbtTwin...
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Programming with Microsoft Visual Basic 2017
- Find the error: daily_sales = [0.0, 0,0, 0.0, 0.0, 0.0, 0.0, 0.0] days_of_week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] for i in range(7): daily_sales[i] = float(input('Enter the sales for ' \ + days_of_week[i] + ': ')arrow_forwardFind the error: daily_sales = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] days_of_week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] for i in range(6): daily_sales[i] = float(input('Enter the sales for ' \ + days_of_week[i] + ': '))arrow_forwardWhat are the steps you will follow in order to check the database and fix any problems with it and normalize it? Give two references with your answer.arrow_forward
- What are the steps you will follow in order to check the database and fix any problems with it? Have in mind that you SHOULD normalize it as well. Consider that the database offline is not allowed since people are connected to it and personal data might be bridged and not secured. Provide three refernces with you answer.arrow_forwardShould software manufacturers should be tolerant of the practice of software piracy in third-world countries to allow these countries an opportunity to move more quickly into the information age? Why or why not?arrow_forwardI would like to know about the features of Advanced Threat Protection (ATP), AMD-V, and domain name space (DNS).arrow_forward
- I need help to resolve the following activityarrow_forwardModern life has been impacted immensely by computers. Computers have penetrated every aspect of oursociety, either for better or for worse. From supermarket scanners calculating our shopping transactionswhile keeping store inventory; robots that handle highly specialized tasks or even simple human tasks,computers do much more than just computing. But where did all this technology come from and whereis it heading? Does the future look promising or should we worry about computers taking over theworld? Or are they just a necessary evil? Provide three references with your answer.arrow_forwardWhat are the steps you will follow in order to check the database and fix any problems with it? Have in mind that you SHOULD normalize it as well. Describe in full, consider the following:• Taking the database offline is not allowed since people are connected to it.• Personal data might be bridged and not secured. Provide three refernces with you answerarrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT