Bmgt 121 Y1s2 Question Paper
Bmgt 121 Y1s2
Course:Bachelor Of Commerce
Institution: Kabarak University question papers
Exam Year:2010
INSTRUCTIONS:
1. Answer question ONE and any other TWO question.
QUESTION 1 ( 30 MARKS)
1. Write a single visible Basic Program to do the following
a) Enable a command button cmdtest. (2 marks)
b) Declare together two variables int y and int x as integer. (2 marks)
c) Clear a listbox named Istcourses. (2 marks)
d) Add an Item to a combo box cboCourses. (2 marks)
2. A program is required to calculate the area and perimeter of a circle of a circle when
radius is fed in from the keyboard, inside a text box named txtradius. The area and the
perimeter are displayed in the labels Iblarea and Iblperimeter respectively. Using memory
variables, write some code in visual basic, to perform the above task for the click event of
a command button named cmdcalculate. Include a relevant Graphical user interface.
(10 marks)
3. Define the following terms as used in visual basic programming. (10 marks)
(a) Object
(b) Method
(c) Variable
(d) Properties
(e) Event
4. The following is a single executable statement in visual basic.
Tsext1. Text=val(text2.text)+val(text3.text)-val(text4.ltext)/val(text5.text)
Break the statement into two lines acceptable for visual basic execution. (2 marks)
QUESTION 2 (20 MARKS)
1 When developing an application in visual basic, the developer can be in a number of
modes namely design time, runtime and break mode. Explain these modes. (6 marks)
2. Write the following code using with….End with structure. (3 marks)
Ibltest. Caption = “VB”
Ibltest.autosize = True
Ibltest.alignment = vbleft
3. Errors are common to programmers. Describe three classes of errors, and give some
visual basic examples. (9 marks)
4. What is an Array? (2 marks)
QUESTION 3 (20 MARKS)
Study the graphical interface below and answer the questions that follow.
i) Conditional/Comparison operators
ii) Arithmetic Operators.
iii) Logical operators. (6 marks)
QUESTION 5 (20 MARKS)
a) Creating event-driven programs in visual basic requires an approach different from that
used in procedural language; thus creating an application in visual basic involves eight
steps:
Required:
Describe the steps involved. (12 marks)
b) The visual basic integrated development environment (IDE) consist of a number of
element;
Required:
Describe any six elements. (8 marks)
More Question Papers