The City School
Reinforcement Worksheet
Developing Applications – Visual Basic
Term II – 2024
Q1. You are developing a Library management system for your school. Discuss the importance of a
well-designed graphical user interface (GUI) in Visual Basic. Provide specific design considerations
and principles you would apply to make the system user-friendly.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Q2. You are given a partially completed Visual Basic program that is intended to calculate the final
grade for a student based on their test scores. However, there are errors in the program that need to
be identified and fixed.
Identify & fix the errors in the code given below:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim Score As Integer
Dim Grade As Integer
Score = TextBox1.Text
If Score >= 90 Then
Grade = ‘A’
ElseIf Score >= 80 Then
Grade = "B"
ElseIf Score >= 70 Then
Grade = "C"
Else
Grade = "Needs Improvement"
End
TextBox2.Text = grade
End Sub
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Q3. What will be the OUTPUT of the following program?
Dim i As Integer
Dim sum As Integer
sum = 0
For i = 1 To 5
sum = sum + i
Next
Label1.Text = sum
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Q.4 Write the name & define the following Visual basic Elements / Controls.
GUI Controls Name Definition
Q. 5 Identify and explain the difference between Public and Private Variables.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________