Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Windows Forms Visual Basic Help The purpose of this assignment is get some practice with some debugging. Since we need something to debug, we will
Windows Forms Visual Basic Help
The purpose of this assignment is get some practice with some debugging. Since we need something to debug, we will be focusing on practicing some Branching skills. This is going to involve 3 separate tasks. Problem 1- I am going to give you some code (it is at the bottom of this assignment. Create and application, Create the Form design, then go over to Form1.vb and replace all the content with the code I provide. To get to Form1.vb, I would just double click the form. Look at the code and figure out what you think will be the result, then run the code. You shouldn't get what you expect. There are logic errors that you need to find and fix. Insert some breakpoints, pull up some debug windows and figure out what is going on, and fix the problems. In a Word file, give me a screen shot showing the breakpoints Problem 2 and Problem 3 are basically the same, except you are going to do it two different ways. In problem 2 the user selects a state from the listbox and then displays the State Name, State Capital and State Bird for the selected state using a series of Else IF statements. Problem 3 is the same except you use a combobox, and a Select Case. In both problems, if the user selects None, use the else feature of the Elself and Select Case to blank out the information from the output labels. The exit button should exit the app. Put Your Name Here 1 Problem 1 - Debugging Volume Answer Sum Answer Problem 2 - Series of Elself State Name IblStateName State Capital IblStateCapital None Alabama New York South Carolina State Bird IblState Bird Problem 3 - Select Case State Name IblStateName2 State Capital IblState Capital State Bird IblState Bird2 Exit 5 pts 5 pts . Design the form as above. Spend some time to align objects and lay thing out well. Properly Name all Objects. You only need to rename objects only if you need to reference them in the code. So you will need to rename 13 objects in this case. Add Comments at the top of each subroutine (but inside the subroutine) explaining what the subroutine does Have Object Strict On Put your name at the top of the form (Where is says Put your Name Here) Add color to the form (your choice of color) Do not have any empty stubs (you will lose 1 point for each) . 5 pts 5 pts 1 pts 4 pts . . . 10 pts 10 pts 5 pts Problem 1 - Debugging Fix the problems in Area Fix the problems in the Letter Count Insert a breakpoint somewhere in both Area and Letter Count Subroutines. Open and pin one of the Debug Windows (your pick) at the bottom of the screen. If you use the Watch Window, you need at least one watch variable in the window. The code you copied into Form1.vb has the line Option Strict Off. Change it to Option Strict On 5 pts 5 pts Problem 2-Series of Else If statements When the user selects a state from the listbox, populate the labels with appropriate information If the user selects None, clear out the labels (state name, capital, and bird) Insert a breakpoint in the subroutine the stores the information in the labels. Give me a screen shot showing the breakpoint. 10 pts 10 pts 5 pts Problem 3 - Select Case When the user selects a state from the combobox, populate the labels with appropriate information If the user selects None, clear out the labels (state name, capital, and bird) Insert a breakpoint in the subroutine the stores the information in the labels. 10 pts 10 pts 5 pts Replace the code in Form 1.vb with the code provided below in yellow. Make sure your controls on the form are consistent with the code (if not there will be red squiggles). This is only the starting code for Problem 1. Option Strict Off Public Class Form1 Private Sub btnVolume_Click(sender As Object, e As EventArgs) Handles btnVolume.Click Dim x As Integer Dim y As Integer Dim z As Integer Dim answer As Integer x = 1.5 y = 3 z = 3 answer = x*y* z TextBox1.Text = answer End Sub Private Sub btnCount_Click(sender As Object, e As EventArgs) Handles btnCount.Click Dim i As Integer Dim maxNbr as integer Dim sum As Integer maxNbr = txtMax.text For i = 1 To maxNbr Sum = sum + 1 Next TextBox2.Text = sum End Sub End Class The purpose of this assignment is get some practice with some debugging. Since we need something to debug, we will be focusing on practicing some Branching skills. This is going to involve 3 separate tasks. Problem 1- I am going to give you some code (it is at the bottom of this assignment. Create and application, Create the Form design, then go over to Form1.vb and replace all the content with the code I provide. To get to Form1.vb, I would just double click the form. Look at the code and figure out what you think will be the result, then run the code. You shouldn't get what you expect. There are logic errors that you need to find and fix. Insert some breakpoints, pull up some debug windows and figure out what is going on, and fix the problems. In a Word file, give me a screen shot showing the breakpoints Problem 2 and Problem 3 are basically the same, except you are going to do it two different ways. In problem 2 the user selects a state from the listbox and then displays the State Name, State Capital and State Bird for the selected state using a series of Else IF statements. Problem 3 is the same except you use a combobox, and a Select Case. In both problems, if the user selects None, use the else feature of the Elself and Select Case to blank out the information from the output labels. The exit button should exit the app. Put Your Name Here 1 Problem 1 - Debugging Volume Answer Sum Answer Problem 2 - Series of Elself State Name IblStateName State Capital IblStateCapital None Alabama New York South Carolina State Bird IblState Bird Problem 3 - Select Case State Name IblStateName2 State Capital IblState Capital State Bird IblState Bird2 Exit 5 pts 5 pts . Design the form as above. Spend some time to align objects and lay thing out well. Properly Name all Objects. You only need to rename objects only if you need to reference them in the code. So you will need to rename 13 objects in this case. Add Comments at the top of each subroutine (but inside the subroutine) explaining what the subroutine does Have Object Strict On Put your name at the top of the form (Where is says Put your Name Here) Add color to the form (your choice of color) Do not have any empty stubs (you will lose 1 point for each) . 5 pts 5 pts 1 pts 4 pts . . . 10 pts 10 pts 5 pts Problem 1 - Debugging Fix the problems in Area Fix the problems in the Letter Count Insert a breakpoint somewhere in both Area and Letter Count Subroutines. Open and pin one of the Debug Windows (your pick) at the bottom of the screen. If you use the Watch Window, you need at least one watch variable in the window. The code you copied into Form1.vb has the line Option Strict Off. Change it to Option Strict On 5 pts 5 pts Problem 2-Series of Else If statements When the user selects a state from the listbox, populate the labels with appropriate information If the user selects None, clear out the labels (state name, capital, and bird) Insert a breakpoint in the subroutine the stores the information in the labels. Give me a screen shot showing the breakpoint. 10 pts 10 pts 5 pts Problem 3 - Select Case When the user selects a state from the combobox, populate the labels with appropriate information If the user selects None, clear out the labels (state name, capital, and bird) Insert a breakpoint in the subroutine the stores the information in the labels. 10 pts 10 pts 5 pts Replace the code in Form 1.vb with the code provided below in yellow. Make sure your controls on the form are consistent with the code (if not there will be red squiggles). This is only the starting code for Problem 1. Option Strict Off Public Class Form1 Private Sub btnVolume_Click(sender As Object, e As EventArgs) Handles btnVolume.Click Dim x As Integer Dim y As Integer Dim z As Integer Dim answer As Integer x = 1.5 y = 3 z = 3 answer = x*y* z TextBox1.Text = answer End Sub Private Sub btnCount_Click(sender As Object, e As EventArgs) Handles btnCount.Click Dim i As Integer Dim maxNbr as integer Dim sum As Integer maxNbr = txtMax.text For i = 1 To maxNbr Sum = sum + 1 Next TextBox2.Text = sum End Sub End ClassStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started