Transcribed image text: Selection Homework -Student Name Label 1 for IntNumber TextBox Label 2 Display IntNumber Compute Button Show transcribed image text Expert Answer Test your program and enter different values to make sure the result displays correctly.
Then you store the value from TextBox into intNumber variable, so here is your code:Īfter these two lines you type the selection structure listed on the first page of assignment:įinally, you need to display the result in the label control, so you need the following code to display the result: To start the coding, first you need to declare a variable an integer: Then double-click on the Button which now should read “computer” to see the VB coding area, Form1.vb Follow the instructions to name each control and add necessary text properties for each control. Upon clicking on New Project window, you will be placed in VB editor window, see below:įrom here on, click on View menu to activate Toolbox menu, expand Common Buttons, Then add two Label controls, one TextBox and one Button controls on the form. Type project name: yourlastname-firstname-SelectionVBProgram in Name box, click on Browse button, locate CS folder and just select it do not double-click on it.Then you will see the following window, click on OK to continue this creates a folder with your project name and inside of this folder there is one folder and a file with SLN extension. To create a new project in VB, open Visual Studio > From File > New > Project, then you will see the following window:Įxpand Visual Basic group, choose Windows Classic Desktop, choose Windows Forms App (.NET Framework).
Your pdf file should contain the screenshots of all the execution steps (similar to last HW). To receive credit for this assignment, create a pdf file and name it Yourlastname-HW9.pdf.For each test the result should be: 100, 500, and 3000 respectively. Run the program and test it for intNumber values of 50, 5. Double-click on Compute Button declare a variable called intNumber as Integer, then type the below code.
Button, Text: Compute Name: btnComputeĩ.Label2, Text: Display IntNumber Name: lblResult BorderStyle: Fixed 3D AutoSize: False.Label1, Text: Enter a value for IntNumber Name: lblIntNumber.Form: change the title of the form to: Selection Homework – your name.
See below for more information on how to create this project You will save this project in your CS 3 folder and name it as: yourlastname-firstname-SelectionVBProgram.