<=Back

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

Outline the function of each of the following visual basic program windows: (2 marks)
(i)Form layout;
(ii)Immediate.

    Viewed:  400  times

  Share in:
        

Question Answer:





Questions List:

1. Outline the function of each of the following properties of an ADO dialog box data control (i)Command type (ii)UserName (iii)RecordSource
2. With aid of an example, explain each of the following operator as used in visual basic programming. (i) \ (ii) ^ (iii,) Mod
3. State the difference between properties and variables as used in visual basic programming
4. Table1 shows the criteria used by a lottery company to award prizes to players. The players represent a random integer number. Any number other than those in the table do not attract a prize. Write a program in visual basic language that would allow the user to enter a random number in textbox. The program should then display the prize amount on a message box. Use selector case and attach the
5. State the circumstance under which each of the following visual basic data type is used: (3 marks) (i)Byte (ii)Long (iii)Double
6. In visual basic program, a variable X is assigned a value 25 and variable y is assigned value 56. Determine the output generated by each of the following statements in the program: (6 marks) (i) NOT (X=Y) AND (Y<30) (ii) (X>10) XOR ((Y-X) <30)
7. Explain each of the following as used in visual basic program. (i) ADO record set object; (ii) ADO connection object
8. Write a program in visual basic language that would be used to solve the following mathematical sequence for values of n and x each captured from respective text boxes. The results are displayed on a picture box. Use for…next loop and the code to a command button
9. State four controls in a visual basic programming language that allows a user to select a value from a predefined list during the run time
10. Outline four considerations to be taken before installing visual basic applications
11. Distinguish between unconditional loop and conditional loop as used in programming
12. State the meaning of each of the following debugging terms as used in visual basic programming. (i) Error Handlers; (ii) Breakpoint
13. Table 2 shows English language greetings based on a particular day of the time of the day. Use it to answer the questions that follows: Write a program in visual basic language that allows a user to enter a time in decimal form through an InputBox function. The program should then display the appropriate greetings on a message box. Use if then elseif construct and attach the code to a command butt
14. Explain a circumstance under which each of the following controls is used in visual basic program: (i)Label; (ii)Option button
15. Outline the function of each of the following features of visual basic program. (2 marks) (i) Ms FlexGrid grid (ii) Visual data manager
16. Figure 1 shows a properties of a window for an ADO control used by a programmer in visual basic program. Use it to answer the question that follows: Explain the use of the following field as indicated in figure 1. (i)Command type; (ii)Table or stored procedure name (iii)Command text(SQL)
17. Write a program in visual basic language that would generate the following output when executed.
18. Outline the function of each of the following visual basic program windows: (2 marks) (i)Form layout; (ii)Immediate.
19. Distinguish between single document interface (SID) and multiple document interface (MID) as used in visual basic programming.
20. Explain a circumstance under which the statement “option explicit” is used in in a visual basic program.
21. Write a program in visual basic language that prompt a user to enter the two numbers through the use of text box. The program should then perform division of the two numbers and display the results. The program should include an error object that traps the error arising from the division by zero. (Hint: division by zero error is 11)
22. Describe each of the following as used in visual basic programming: (4 marks) (i) data control; (ii) database engine
23. State the output from each of the following visual basic statements: (4 marks) (i) Print Format (8972.2, “Fixed”) (ii)Print Format (89722, “Standard”) (iii)Print Format (8972.265, “Currency”) (iv)Print Format (0.56324, “percent”)
24. Ann created a program in visual basic. When she executed, she encountered the error message object required (Error 424). Explain four possible causes of this error
25. Write a program in visual basic that prompts a user to enter a numeric value of upper bound of a matrix. The program the assigns the square of all the positive integers less than the number entered and display them in a list box
26. Explain two methods associated with a combo box control in visual basic programming language.
27. Explain each of the following terms as used in visual programming :(4 marks) (i) general procedure; (ii) event procedure
28. Distinguish between parallel array and two dimensional array as used in visual basic programming.
29. Figure 2 shows a visual basic form design intended to update a database with the field StudName, Class and AddNo using the ADO Control named adostudDetails to interface the application and the database. use it to answer the question that follow. Write a visual basic procedure attached to each of the following control: (i)The command button named endExit that would be use
30. Outline the function of each of the following event associated with visual basic controls: (i) Keydown (ii) keyPress (iv)KeyUp (v)Mousedown
31. Distinguish between argument and parameter as used in visual basic programming
32. Outline four advantages of using SQL commands in report created in visual basic
33. write a program in visual basic to prompt user a user to enter a number through inputbox function.The program should then assign all the odd numbers less than the number entered into a dynamic array. The program should display numbers in the array in the picture box control. Use while loop and attach the command button.