0% found this document useful (0 votes)
10 views4 pages

2017 Nov

Past Paper

Uploaded by

John Njiru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

2017 Nov

Past Paper

Uploaded by

John Njiru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
easytvet.com 2920/205 VISUAL PROGRAMMING November 2017 Time hours THE KENYA NATIONAL EXAMINATIONS COUNCIL DIPLOMA IN INFORMATION COMMUNICATION TECHNOLOGY MODULE II VISUAL PROGRAMMING Shours INSTRUCTIONS TO CANDIDATES Answer any FIVE of the following EIGHT questions in the answer booklet provided. All questions carry equal marks Candidates should answer the questions in English. This paper consists of 4 printed pages. Candidates should check the question paper to ascertain that all the Pages are printed as indicated and that no questions are missing. ©2017 The Kenya National Examinations Council. Turn over (b) © () © () (b) (oe 2920/2085 easytvet.com (Outline three factors that could be considered when setting control properties ina Visual Basic program. (G marks) (ii) Distinguish between an object and a control as used in Visual Basic program Environment (2 marks) (Describe the term menu editor as used in Visual Basic programming. (2 marks) (ii) Describe two properties applied in a menu editor. (4 marks) () _ Distinguish between sentinel and flag controlled loops as used in programming. (4 marks) (ii) Write a program in Visual Basic that would display even numbers between 10 and 20.on a form. Use a do while statement. Attach the cade to a command button. (5 marks) State the prefix for each of the following Visual Basic tools: (2 marks) (Timer, (i) Option Button; (ii) Shape; (i) Horizontal ScrollBar. Describe three Project Explorer buttons used in a Visual Basic program. (6 marks) Figure | shows a list of numbers in an array. Use it to answer the question that follows. (i az Tar a9 Tar [25 J26 [28 Figure | Perform a binary search on the array showing the steps, given that the search key is 28 (5 marks) Write a program in Visual Basic that accepts a name of a person through the use of an input box .The program should then add the name to a list box through the use of a procedure. Attach the code to a command button, (7 marks) Outline four characteristics of a Visual Programming language. (Amarks) (Describe a sub procedure as used in a Visual programming, (2 marks) (ii) Outline three characteristics of an event as used in Visual Basic programming. Q marks) Distinguish between unload and hide methods as used in a Visual Basic program. (4 marks) easytvet.com (@) A book supplier offers a discount of 10% when the total cost of books purchased is more than 10,000, Write a program in Visual Basic that accepts the price of three books ‘one at a time through an input box. The program computes total cost, discount if any and then displays the amount payable on a picture box. Attach the code to a command button. (7 marks) 4. (a) The following are programming languages. Visual Basic, PHP JavaScript, Visual C++, Python, lisp Categorise each language as either event driven or procedural programming languages. (3 marks) (b) Outline three properties of a user defined function. GB marks) (©) Explain three similarities between ADO data control and data environment as used in Visual Basic programming. (6 marks) (@)@)_—sExplain the use of ubound{) as used in an array. (2 marks) (ii) Write a program in Visual Basic that accepts five values in an array. The program then displays the smallest and the largest value on the form. Attach the code to. a command button, (6 marks) 5 (a) _State the output generated when each of the following Visual Basic statement is executed, (4 marks) (Mid (“Visual Environment”, 3, 6) Gi) InStr(1, "Visual Environment", "Environment") Gi) Print Len ( “Visual Environment”) (iv) Print RTrim("Visual Environment") (b) Describe two values for an EOF action in a Visual Basic program. (4 marks) “ (©) John, a programmer would like to include error handling messages in a Visual Basic program. Explain three approaches that he could consider. (6 marks) (@) Table 1 shows details of Module | subjects. Use it to answer the question that follows: Subject code | Subject name Label colour 4 Ic. Red 6 Programming Green 8 Mathematics Orange ‘Any other | Does not exist White number Write a program in Visual Basic that accepts the subject code through the use of textbox. The program then displays the subject name on a label and changes the label background colour as indicated when a command button is clicked. Use a select case statement. (6 marks) 2920/205 3 November 2017 Turn over b) () 3) (©) (d) 2920/205 November 2077 easytvet.com Outline three Recordset methods that enables navigation in a Visual Basic program, (3 marks) Describe three ADO data locking options used in a Visual Basic program, (6 marks) Alice tried connecting a database table to a form, When she clicked the test connection bution, @ message “unsuccessful” was displayed. Exptain three possible reasons that could lead to this, (6 marks) Write a program in Visual Basic that would accept the name of a person through the use of a text box. The program then displays “ Hallo Nelly” on a message box() when the name entered is Nelly, otherwise it displays “ unknown name” .Attach the code to a command button. (S marks) Outline two keypress events and two mouse events ina Visual Basic program. (4 marks) Differentiate between Print x. y and Picturel.Print x, y statements as used in a Visual Basic program. (4 marks) Marion, a programmer would Like to include err object method in a Visual Basic program. Explain ¢wo methods that she could consider . (4 marks) Write a program in Visual Basic that uses a procedure to capture the radius of a circle through the use of a textbox. The program then computes the area of a circle and volume of a sphere through a procedure and displays the results on a form. Attach the code to a cornmand button. (8 marks) Outline four sorting techniques that could be used in a Visual Basic program. (4 marks) Mary prefers using a binary tree to search for a record, Explain three challenges she could face, (6 marks) Figure 2 shows a user interface in a Visual Basic program. Use it to answer the question that follows. Figure 2 Write a program in Visual Basic that could implement the interface. The program should clear the results in the picturebox when the button clear is clicked. (10 marks) THIS IS THE LAST PRINTED PAGE. 4

You might also like