<=Back

<=KNEC Diploma in ICT module 2 Visual Programming past paper: November 2016

Explain each of the following features as used in visual basic programming language. (4 marks)
(i) Data binding;
(ii) Split view.

    Viewed:  355  times

  Share in:
        

Question Answer:





Questions List:

1. Explain a reason that make visual basic not suitable for developing expert systems
2. Figure 1 shows two features in a visual basic integrated development environment. use it to answer the question that follows: Describe the features labelled II and I.
3. Explain each of the following terms as used in visual basic programming: (4 marks) (I) Event; (II) Method.
4. Distinguish between pass by value and pass by reference as used in visual basic programming.
5. Write a visual basic program that would compute the average of odd integers from 61 to 150 and display the output on a form. Use for...loop. Attach the code to a command button
6. State the prefix associated with each of the following visual basic program controls; (2 marks) (I) optionbutton; (II) Menu; (III) Listbox (IV) Timer.
7. Table 1 shows visual basic controls and their associated properties. Use it to answer the question that follows; Outline the function of each of the properties in the controls
8. Distinguish between DriveListBox and DirListBox controls as used in a visual basic program
9. Outline two inbuilt visual basic Functions that may be used to arrange data in database
10. State the output generated when each of the following Visual Basic program statements is executed (6 marks) (I)Print Abs(-10/4) II) Print Sqr(25)
11. A student created a Visual Basic program and linked it to a database through a data control named Data1. Write Visual Basic program statement that could be used to: (i) View the next record in database; (ii) Save changes made to a record in the database (iii) delete a record from the database
12. Outline the reason that makes each of the following visual basic variable name invalid: (2 marks) (I) Number# (II) Public
13. Assuming visual basic programming language, state the order of execution of the following expression. (2 marks) Y = A^ 3 - C * D / E
14. State the output generated when each of the following visual basic string functions are executed in a program. (I) Len (University of research) (II) trim( myname )
15. Outline the purpose of the following project commands in visual basic programming language. (4 marks) (I) Add Data Report; (II) Add data Environment
16. Differentiate between pictureBox and Image control as used in Visual basic program
17. Write a visual basic program that would accept length and width of a rectangular football pitch through the use of inputboxes. The program then computes the perimeter of the pitch through a function and outputs the perimeter through a massage box. Attach the code to a command button
18. A student connected a visual basic application to a database table using data control. Explain two limitations the student may face
19. With the aid of sketch in each case, explain two reports layout that can be generated in visual basic programming language
20. State the function of each of the following formulas in visual basic report. (I) Now (); (II) Count.
21. Describe each of the following control structures as used in programming languages. (4 marks) (i) Decision making; (ii) looping.
22. Write a visual basic program that would generate the following output on a form. Use do while loop. Attach the code to a command button. (4 marks) The value of a is 1 The value of a is 2 The value of a is 3 The value of a is 4
23. State two characteristics of an event driven programming language
24. Write the standard prefix for each of the following visual basic programming language datatypes: (2 marks) (i) Boolean;’ (ii) currency (iii) Byte; (iv) Object
25. A student used Textboxes to enter two integers into a visual basic program in order to get their sum. When the program was executed the program executed was the result generated was a concatenation of the two integers. Explain a reason that could have led to this observation
26. Distinguish between static and module level variables as used in visual basic programming language
27. A programmer designed a visual basic interface that would capture details of a student as follows: - Registration Number and Name through the use of text boxes. -Age group in years (15-17,18-20,21-21-23) through the use of option buttons - Gender (Male or Female) through the use of option buttons; When the fields are entered and a command button are clicked, the program displays the registration n
28. Write the prefix for each of the following controls in visual basic programming. (2 mark) (I) Text box; (II) Horizontal scroll bar.
29. Explain each of the following methods of variable declaration in visual basic programming language. (4 marks) (I) Implicit; (II) Explicit
30. Study the following visual basic program code and then answer the question that follows: private sub cmdAdd_Click() Dim Num As Single Num = Inputbox(“ Enter an integer”) Num = Num + 1; Num = (Num+4) mod 4 Picbox. Print Num End Sub Interpret the program given that the input value is 22
31. Distinguish between isDate() and isNumeric() function as used in visual basic programming language.
32. Table 2 shows the criteria used by a certain college to assign grades for the marks scored in examination. Use it to answer the question that follows. Write a visual basic program that would prompt the user to enter the marks scored by a student through an input box. The program then outputs the corresponding grade on a label. Use the select control structure and attach the code to a command but
33. Explain the term user defined data type
34. Write the syntax of a visual basic program user defined data types
35. Define fixed-sized array as used in visual Basic programming language
36. Write a visual basic program that would store six integer values entered through an input box in an array. The program then stores the values in a list. Attach the code to a command button
37. Explain each of the following features as used in visual basic programming language. (4 marks) (i) Data binding; (ii) Split view.
38. The following are some icons used in visual basic programming language: Outline the function of each of the icons
39. State two possible causes of syntax errors in visual basic programming.
40. Outline three ways one could make a program to be easily maintainable
41. Table 3 shows the output of two logical expressions 1 and 2. Use it to answer the question that follows. Write the output of the two expressions are evaluated using each of the following logical operators; (I) OR (II) AND
42. The following are database features in a visual basic program environment. Explain the function of each of the features.
43. Write a visual basic program that would display the string “Welcome” on the status bar control when the form loads
44. Distinguish between single stepping and procedure stepping as used in visual basic error handling