A Smarter Way To Learn
Register
|
Login
|
Access Premium Content
Menu
Toggle navigation
AFRITUTOR
College Level
College Past Paper Answers
College Study Notes
Senior Secondary Level
Form 4 Lessons
Form 3 Lessons
Form 2 Lessons
Form 1 Lessons
Form 4 Exams
Form 3 Exams
Form 2 Exams
Form 1 Exams
Junior Secondary Level
Grade 7 Exams
Grade 8 Exams
Grade 9 Exams
Lower and Upper Primary Level
Grade 1 Exams
Grade 2 Exams
Grade 3 Exams
Grade 4 Exams
Grade 5 Exams
Grade 6 Exams
My Account
Profile
<=Back
<=KNEC Diploma in ICT module 2 Visual Programming past paper: July 2019
Eric a programmer intends to create an application in visual basic program and would like to connect a database to bound controls on the form. Describe two controls that would help him to achieve his goal
 Viewed:
420
times
Share in:
Question Answer:
Login to View Answer
Questions List:
1.
Outline a circumstance under which each of the following controls may be used in visual basic program. (i)Timer; (ii)Picturebox; (iii)Checkbox.
2.
Explain the function of each of the following in a visual basic integrated development environment. (i) Menu bar; (ii) object browser (iii,) Form layout window
3.
Distinguish between caption and name properties as used in visual basic program
4.
Write a program in visual basic that uses functions to generate acceptable remarks based on the average score that student obtain in an examination as shown in the table 1. The program should display the remarks on a label. Use select case statements. Attach the program in a command button.
5.
Outline the function of each of the following properties of a form. (i)Borderstyle (ii)Windowstate (iii)Backcolour.
6.
With the aid of an example in each case, distinguish between a method and an event as used in visual basic program
7.
The following is an error statements in a visual basic program. Use it to answer the question that follows: Explain the function of the part labelled (i), (ii) and(iii) when used in a program segment. (6 marks)
8.
Determine the output from each of the following visual basic logical statements. (2 marks) I. If(expresion1) is true and (expresion2) is true II. If(expresion1) is false and (expresion2) is true
9.
Write a program in visual basic that accepts the number x through the use of a textbox, if the value of the expression x3-x is greater or equal to 100, the program displays a nmessage “A big number!” on a label, otherwise output “A small number!”
10.
Outline three activities that can be done on the project window in a visual basic program.
11.
Explain each of the following terms as used in variable declaration in a visual basic program. (i)lifetime; (ii)scope; (iv)Datatype
12.
Distinguish between variablename=inputBox (“message”) and variablename=Val (inputBox(“message”)) statement as used in visual basic programming
13.
Write a visual basic statement that would display the value 40976 formatted to each of the following: I. date; II. Currency
14.
The length of the hypotenuse of a right-angled is given by the formula c=#sqrt(a^2+b^2)# where a and b are the perpendicular side and c is hypotenuse. Write a program in visual basic that would accept the values a and b through the use of a text box, compute the hypotenuse and display the result on a message box
15.
Outline four methods of a list box as used in a visual basic program
16.
Distinguish between on error go to 0 and on error go to -1 statement in a visual basic program.
17.
Explain the reasons for applying each of the following in a visual basic program. (i)Control array; (ii)Array bound (iii,)Redim statement.
18.
Write a program in visual basic with a label and text box named label1 and Text1 respectively that uses a procedure to perform the following sequence of events when the command button is clicked. Use with statements. (6 marks) •TextBox1 is disabled •The background colour of TextBox1 becomes yellow •Label1 becomes visible •Text on the label to have a blue colour •The font of text on the
19.
State the correct datatype in visual basic programming for each of the following description of statements. (i)The height of a student (in cm) (ii)The number of children in a class (iii)The academic grade of a student; (iv)Country status whether poor or rich.
20.
Ali a programmer created a visual basic program and ran it in his computer, he observed the error” object not found “displayed on the screen. Explain two causes of this error
21.
Explain each of the following as used in data structures: (i) bubble sort: (ii)binary search: (iii’)Tree traversal.
22.
Write a program in visual basic that would display the following pattern on a picturebox
23.
Outline three ways in which a project can be started in a visual basic program window
24.
Distinguish between adcmdtext and adcmdtable values as used in ADO Data control in a visual basic program
25.
Figure 1 shows a dialog box used to prompt one to choose one the three mechanism for connecting a database. Explain the circumstance that may lead one to use each of the option labeled (i), (ii) and (iii).
26.
Write a program in visual basic that would compute the summation of integer from 20 to 50 and display the results on a label. Use for loop statement
27.
Outline four events of an ADO data control as used in visual basic programming.
28.
Distinguish between public and local array declaration in a visual basic program
29.
Describe the two properties to be set on a textbox in order to display data from a database in visual basic
30.
Write a program in visual basic that accepts a name and a score of six students in a test through the use of inputbox(). The program should then display the names, scores and the average scores on a picturebox. Attach the code to a command button
31.
Distinguish between a listbox and a combobox as used in visual basic
32.
Write an algorithm to implement each of the following in a stack data structures: (i) Check if it is full; (ii) Add an element.
33.
Eric a programmer intends to create an application in visual basic program and would like to connect a database to bound controls on the form. Describe two controls that would help him to achieve his goal
34.
Write a program in visual basic that on command button click, the program add the values from three boxes into a database table with the field named, AdNo, StudName and StudClass respectively using the ADO command. The program should then the update the database and display the message “Data added” on a messagebox ().