
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 solution
Chapter 4 Solutions
Programming with Microsoft Visual Basic 2017, Loose-Leaf Version
- THIS IS NOT A GRADING ASSIGNMENT: Please only do lab 2.2 (bottom part of the first picture) For that Lab 2.2 do: *Part 1 *Part 2 *Part 3 I also attached Section 2.5.2 which is part of the step 1 so you can read what is it about. Thank you!arrow_forwardcan you please give me: * the code (step 3) *the list file (step 5) *and answer step 6 Thank youarrow_forward# Find the error# Why will the following code not print out a list of contact namesphoneBook = {'Doe, Jane' : '843-000-0000' ,'Doe, John' : '843-111-1111' ,'Smith, Adam' : '843-222-2222' ,'Jobs, Steve' : '999-333-3333' ,}for contact in phoneBook.values():print(contact)arrow_forward
- # Find the error:# The following code creates an empty dictionary and attempts to add a record# Why will the following code not create a new dictionary entry as intended?phoneBook = {}phoneBook{'Jobs, Steve'} = '999-111-1111'arrow_forwardSelect all the possible polar representations of the vector that is obtained from rotating where by Zrot Ź x = 3e² T= 3п 8 Hint: Consider the negative angle that is equivalent to the positive angle of the rotated vector. 0arrow_forwardCharacter Analysis If you have downloaded the source code you will find a file named text.txt on the Chapter 08 folder. Write a program that reads the file's contents and determines the following: The number of uppercase letters in the file The number of lowercase letter in the file The number of digits in the file The number of whitespace characters in the filearrow_forward
- Write a program that reads the text file's contents and calculates and outputs the following in this order: • The number of words in the file • The number of lines in the file • The number of uppercase letters in the file • The number of lowercase letters in the file • The number of digits in the file • The number of letter H's in the file • The number of whitespace characters in the file NOTE: Your program should include at least one try-except error handling statement block. Your program should also validate any input that could cause your program to crash. I'm Henery The Eighth, I Am! Henery The Eighth, I Am, I am!I got married to the widow next door,She's been married seven times before.And ev'ryone was a Henery,She wouldn't have Willie or a Sam.I'm her eighth old man named Henery,Henery the Eighth, I Am!Second verse same as the first!I'm Henery The Eighth, I Am! Henery The Eighth, I Am, I am!I got married to the widow next door,She's been married seven times before.And…arrow_forwardFigure 4-40 Modern Database Management, 13th edition, question 4-53arrow_forwardWhich of the following needs improvement in the dashboard shown? A. Instructional clarity missing for the views B. Filter placed at the top of the dashboard C. Inconsistent use of colors to represent missed goals D. Dashboard title too largearrow_forward
- If we click Show dashboard title in this dashboard, what will the title be?arrow_forwardPlease draw the diagram where it is asked to be drawn. Don't just describe how to do it.arrow_forwardC. Homework Assignment Task: Write a one-page CV using the provided template. Steps: 1. Use the CV guide to structure your CV. 2. Fill in each section with real information about yourself. 3. Format your CV neatly and use professional language. 4. Submit to the instructor before the next classarrow_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



