Click to follow our Afritutor YouTube Channel, subscribe and click notifications and get updates on new learning videos


<=Back

<=Exam Prediction paper: Diploma in ICT module 2 Visual Basic Programming

State a circumstance under which each of the following statements are used in a visual basic program:
(i.) ReDim;
(ii.) Option base;
(iii.) Preserve

    Viewed:  47  times
For Better experience and learning,for video answers, after video ends playing, click next question in the questions list!!!

  Share in:
        

Question Answer:





Questions List:

1. Outline four reasons why adhering to naming conventions for variable in a visual basic program is important
2. Write a Visual Basic program that prompts a user to enter a student’s score in three subjects through input box.The program should then compute the average of the scores and display the results on the message “please enter numeric values” on a massage box when input is not numeric
3. Explain each of the following statements as used in error trapping in a visual basic program: i. On Error Goto label; ii. On Error Resume Next; iii. On Error Goto 0.
4. Outline four methods used in a form in a visual basic program
5. State a circumstance under which each of the following statements are used in a visual basic program: (i.) ReDim; (ii.) Option base; (iii.) Preserve
6. Outline four controls that may enable a user to make a choice from a list of data in a visual basic program
7. Write a program in visual basic that accepts the number x through the use of a textbox, if the value of the expression x^3-x is greater or equal to 100, the program displays a message “A big number” on a label, otherwise “A small number!”
8. The length of the hypotenuse of a right-angled is given by the formula c=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
9. Outline a circumstance under which each of the following controls may be used in visual basic program (i) Timer; (ii) Picturebox; (iii) Checkbox
10. 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
11. Distinguish between caption and name properties as used in visual basic program
12. 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
13. Explain the reason for applying each of the following in a visual basic program. (i) Control array; (ii) array bound (iii,) Redim statement
14. 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. • 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 label
15. State the correct data type in visual basic programming for each of the following description of statement. (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
16. Determine the output from each of the following visual basic logical statements. I. if(expresion1) is true and (expresion2) is true II. if(expresion1) is false and (expresion2) is true
17. With the aid of an example in each case, distinguish between a method and an event as used in visual basic program
18. Explain each of the following as used in data structures: (6 marks) (i) bubble sort: (ii) binary search: (iii’) Tree traversal
19. 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
20. Distinguish between a listbox and a combobox as used in visual basic
21. Write an algorithm to implement each of the following in a stack data structures (i) Check if it is full; (ii) Add an element.


About Us

Contact us

Terms of use | Privacy policy

Follow Us:               

All Rights Reserved © 2024; pscustudies.com