Professional Documents
Culture Documents
Semester 2 2019
Peer Mentoring
Question 1
Information:
1. txtFname
2. txtLname
3. txtAge
4. txtAdress
Write the code for the message shown above in the label named as lblMessage.
Question 2
UI Design: Your friend who is a teacher wants an application that he can use to determine the grade
based on the following criteria. All he wants to do is to enter the test score and click a button to
display the grade.
Code Writing: Write the VB.NET code that would go in the click event handler of the Display button
that would implement the criteria given in Table 1; display the correct grade in a label called
lblGrade given the test score as input in a textbox named txtScore. (A partially complete event
handler is already given). Declare all necessary variables. Validate the test score so that processing
is only done if it is a number between 0 and 100 (both inclusive). Assume that in your program the
user is supposed to enter a whole number.
Multiple choice
2. With the logical operator _______, both conditions must be true for the entire condition to
evaluate to true.
(A) Or
(B) Not
(C) =
(D) And
3. A CheckBox’s Checked property is True when a checkbox is selected and is False when it is
deselected. Which of the following pieces of code correctly displays imgSun when chkSun is
selected and hides imgSun when chkSun is unselected under the click event of a command
button?
(A) Boolean
(B) Integer
(C) String
(D) Single
(E) Double
5. The use of _____ allows you to let the user chose only one option from a group of choices.
A) text box
B) check box
C) radio button
D) label