What do you understand by event driven programming list and


Part A

Q1. What do you understand by event driven programming? List and explain about some of the events supported by Visual Basic Objects.

Q2. What are the different data types supported by Visual Basic ? How they can be declared? Also mention their uses.

Q3. Give examples of passing arguments by value and passing arguments by reference in Visual Basic procedures.

Q4. Give difference between arrays and dynamic arrays. How they can be created in Visual Basic? Give Syntax.

Q5. What are the advantage of ADO Data Control ? Explain about different objects of ADO model.

Part B

Q1. Write a program using dynamic arrays to record the high temperatures of last seven days and to display all of them with the average of high temperatures. Use three buttons on the screen, one to enter the temperature, second to display the result and third to exit from program.

Q2. Write a small hand calculator. Use command buttons for the number keys, the Enter key and the + key etc. Use a label to display the results.

Q3. Develop a WordPad application using MDI forms, having basic features of File and Edit.

Q4. Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever necessary.

Part C

1. Assume that A, B, and C are conditions, with A being true, B being true, and C being false. Give the truth value of each of the following conditions.

(a) A And (Not B)
(b) A And Not (B Or C)
(c) Not (A And B)

2. Consider the following two sets of code.

(a) If (a = 1) And (b = 1) Then (b) If a = 1 Then txtBox.Text = "Hi" If b = 1 Then
End If txtBox.Text = "Hi"
End If
End If
Which one of the following statements is true?

(A) (a) and (b) will produce different outputs.
(B) (b) is not a valid set of VB instructions.
(C) The two sets of code are equivalent, but (a) is preferred to (b) because (a) is clearer.
(D) The condition statement in (a) is not valid.

3. What will be displayed by the following program when the button is clicked?

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim a, b, c, x As Double
a = 5
b = 3
c = 6
If a > c Then
x = 1
Else
If b > c Then
x = 2
Else
x = 3
txtBox.Text = CStr(x)
End If
End If
End Sub
(A) 1
(B) 2
(C) 3
(D) None of the above.

4. If the loop is to be executed at least once, the condition should be checked at the
__________.
(A) top of the loop
(B) middle of the loop
(C) bottom of the loop
(D) Nothing should be checked

5. Suppose a variable is to tell whether or not the user wants further information. A good data type for such a variable is
(A) Boolean
(B) Integer
(C) Double
(D) String

6. VB uses an object called ____________ to hold a table.
(A) Record
(B) Recordset
(C) file
(D) table

7. Which of these is used to open an database ?
(√) (A) Set dbMyDB = OpenDatabase("MyDatabase.mdb")
(B) dbMyDB = OpenDatabase("MyDatabase.mdb")
(C) Set dbMyDB = OpenDatabase None of these
(D) None of these
d. None of the above

Request for Solution File

Ask an Expert for Answer!!
Visual Basic Programming: What do you understand by event driven programming list and
Reference No:- TGS0976406

Expected delivery within 24 Hours