There are four building 'blocks' in creating software applications. (a) Seqential or Serial execution of code. When one VB statemnt is done then it goes to the next one. This was covered in Chapter 1,...

1 answer below »
Code in Visual Basic


There are four building 'blocks' in creating software applications. (a) Seqential or Serial execution of code. When one VB statemnt is done then it goes to the next one. This was covered in Chapter 1, 2, 3. (b) Decision making - This was covered in Chapter 4 If (condition) then stmt endif or if (condition) then stmt1 else stmt2 ebdif if the condition is true then the staement is executed otherwise not. (c) Repetition or Looping - This was covered in Chapter 5 This is a long chapter and in the interest of time I want you to focus on two ways of looping - for and do while. In the text, look for those two way of looping and you should be able to do the labs. (d) Sub programs - Not covered in this course. To reinforce this knowlegde here are some examples. A project, 'LoopExamples' is available for download from the this folder. Unzip the file. There will be a LoopExamples folder. go inside it. double click LoopExamples.sln file. This will launch visual studio. It has four buttons, LP1, LP2, LP3 and LP4 and an exit button. (i) When button LP1 is clicked display in a label the following output: 1 2 3 4 5 6 7 8 9 10 Use Do While loop. Display the result in Label. see the comments in the code for an explanation of the various parts. (ii) When button LP2 is clicked display in a label the following output: 10 20 30 40 50 60 70 80 90 100 Use For loop. Display the result in Label. (iii) When button LP3 is clicked display in a label the following output: 1 -2 3 -4 5 -6 7 -8 9 -10 Use For loop. Display the result in Label. (iv) When button LP4 is clicked display in a label the following output: -1 2 -3 4 -5 6 -7 8 -9 10 Use For loop. Display the result in Label. Copy and paste the code from LP3 button in LP4 button code handler. MODIFY ONLY ONE CHARACTER in the code given for LP3 to get the results for LP4. (v) Have a button, "Knock Out", which when clicked will print: 1 2 3 4 5 6 7 8 9 10 KnockOut. Must use a while loop. Display the result in Label. Write code to accomplish this. (vi) Have a button, "Launch", which when clicked will print: 10 9 8 7 6 5 4 3 2 1 Blastoff. Must use a For loop. Display the result in Label. Write code to accomplish this. Grades - VB is 40% of your overall grade. As we are covering the VB material at the tail end of the course and as the more difficult material is being tested in the last three weeks and final exam, you might see a dip in your grade. Just be aware that is what is happening if you don't turn in working labs.
Answered Same DayFeb 07, 2021

Answer To: There are four building 'blocks' in creating software applications. (a) Seqential or Serial...

Sudipta answered on Feb 08 2021
139 Votes
Public Class Form1
Dim i As Integer = 1
Dim j As Integer = 10
Dim str As String = ""
Private Sub
btnLP1_Click(sender As Object, e As EventArgs) Handles btnLP1.Click
str = ""
Do While i <= 10
str = str + i.ToString() + " "
i = i + 1
Loop
lblAns.Text = str
End Sub
Private Sub btnLP2_Click(sender As Object, e As EventArgs) Handles btnLP2.Click
str = ""
For i = 1 To 10
str = str + j.ToString() + " "
j = j +...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here