You are on page 1of 5

University of the South Pacific

School of Computing, Information and Mathematical Sciences

IS122 – Information Systems II

Semester 2 2019

Peer Mentoring

Question 1

Information:

Text box names:

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.

Design a suitable user interface for this application.

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

1. Which of the following is not a valid rule for identifiers?

(A) Names may contain underscores.

(B) Names may contain letters.

(C) Names may contain digits.

(D) Names may contain spaces.

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) imgSun.Visible = chkSun.Checked

(B) imgSun.Visible = chkSun.UnChecked

(C) imgSun.Visible = True

(D) imgSun.Visible = False

(E) imgSun.Visible = chkSun.Visible

(F) imgSun.Visible = chkSun.Text

4. What type of variable would you use to store a value X = “3.65”?

(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

You might also like