FACULTY OF APPLIED SCIENCE
AUGUST EXAMINATIONS 2009
SUBJECT:
CODE:
VISUAL PROGRAMING CONCEPTS AND DEVELOPMENT
SCS 1206
INSTRUCTIONS TO CANDIDATES
Answer all questions from section A and any 2 from section B.
Each question carries 25 marks
3HOURS
SECTION A
QUESTION ONE
a)
Explain any four advantages of using Visual Programming as compared to
Commandline Programming for application development.
[8]
b)
With the aid of examples explain the following types of programming errors;
i) Logic errors, ii) Syntax errors. iii) Run-time errors.
c)
[2]
[2]
[2]
Define the following terms as used in Visual Programming
i.
User Interface ii. Label iii. Textbox iv. Checkbox
v.
Form
[10]
QUESTION TWO
Enter Word
Reverse
Palindrome
Write a program that implements the interface shown above and should be able to perform the following functions:
When the Reverse button is clicked, a word that the user inputs in the TextBox is reversed.When the Palindrome button is clicked, the program states wether the word that the user inputs in the TextBox is a palindrome or not.
[25]
SECTION B
QUESTION THREE
a)
Explain the following terms used in object models:
i. Inheritance ii. Generalization iii. Composition iv. Polymorphism
v. Aggregation
[10]
b)
Explain what is meant by “VB.NET implements single inheritance”
[3]
c)
Write code snippet of two classes showing the concept of inheritence, use UML diagrams to express yourself.
[12]
QUESTION FOUR
a)
b)
Define the following terms;
i)
Control ii) Object iii) Property iv) Event Procedure
v)
Method
[10]
Write a VB.NET program that reads the contents of an input file and displays them on the console. The file name is to be specified by the user through the Input
Box.
[15]
2
QUESTION FIVE
a)
What are the advantages and disadvantages of using the Implicit declaration as