Académique Documents
Professionnel Documents
Culture Documents
CONFIDENTIAL
COURSE
COURSE CODE
AIS150
EXAMINATION
APRIL 2011
TIME
3 HOURS
INSTRUCTIONS TO CANDIDATES
1.
This question paper consists of three (3) parts : PART A (20 Questions)
PART B (5 Questions)
PART C (2 Questions)
2.
3.
Do not bring any material into the examination room unless permission is given by the
invigilator.
4.
Please check to make sure that this examination pack consists of:
i)
ii)
iii)
CONFIDENTIAL
CONFIDENTIAL
AC/APR 2011/AIS150
PART A
This part consists of 20 multiple-choice questions. Choose the most suitable answer
and shade the corresponding alphabet representing the answer in the multiple choice
answer sheet provided.
1.
There are six (6) steps in the process of program development cycle. Which of the
following is the third (3rd) step?
A.
B.
C.
D.
2.
VB works with objects, properties and methods. Which of the following is a method?
A.
B.
C.
D.
3.
pseudo-code
flowchart
algorithm
image
5.
Print
Form
Color
Name
Which of the following would be the best for a pictorial representation of program
logic?
A.
B.
C.
D.
4.
Two_One
20ne
Two One
Two. One
Each class of control has a default property. The default property of a command button
is
.
A.
B.
C.
D.
Value
Caption
Visible
Text
CONFIDENTIAL
CONFIDENTIAL
6.
7.
Which of the following statement are the advantages of using named constant in
Visual Basic project?
i)
ii)
iii)
iv)
A.
B.
C.
D.
i & ii
ii & iv
ii, iii & iv
i & iv
Which of the following is NOT a valid statement about the Val function?
A.
B.
C.
D.
8.
Suppose the variable MyName is declared in a Dim statement in two different Sub
procedures. Which statement is true?
A.
B.
C.
D.
9.
AC/APR 2011/AIS150
Given A = 3 and B = 1, what value will be assigned to W when the following statement
is executed?
W=
A.
B.
C.
D.
(-A + 3 * 17)
(A + B)
(A -
B)
16
2
17
3
CONFIDENTIAL
CONFIDENTIAL
10.
AC/APR 2011/AIS150
11.
Which of the following logical operator describe that either one condition must be true
for an entire condition to be true?
A.
B.
C.
D.
12.
Do Until
Do While
Loop Until
Loop While
14.
OR
AND
NOT
EQUAL
The pre test Do/loop that is tested for true to execute until it meets a false to stop is
called the
.
A.
B.
C.
D.
13.
3 .
9
6
0
top to bottom
left to right
right to left
all sides can do
What is the code that will print the current form on the printer?
A.
B.
C.
D.
Printform
Print
Formprint
Printscreen
CONFIDENTIAL
CONFIDENTIAL
15.
an End statement.
an Assignment statement.
a Remark statement.
an event procedure.
What will happen to the Do Until ...Loops if the terminating condition is true the first
time it is tested?
A.
B.
C.
D.
19.
Press and hold the CTRL key and then press the S key.
Open the Run menu and choose Start.
Press the Start button on the toolbar.
Press F5.
18.
17.
A project that halts during execution due to a misspelled name of an object or property,
was halted due to a(n)
.
A.
B.
C.
D.
16.
The
The
The
The
loop will
loop will
loop will
loop will
A.
B.
C.
D.
-1
0
1
4
CONFIDENTIAL
CONFIDENTIAL
20.
AC/APR 2011/AIS150
P r i v a t e Sub Commandl_Click()
For intNumber =12 To 10 Step - 2
p i c O u t . P r i n t intNumber
Next intNumber
End Sub
How many times will the picOut.Print intNumber instruction be processed?
A.
B.
C.
D.
1
2
3
4
(1 Vz marks each)
(Total: 30 marks)
CONFIDENTIAL
CONFIDENTIAL
AC/APR 2011/AIS150
PARTB
This part consists of FIVE (5) questions. Answer ALL questions and write your
answers in the answer booklet.
QUESTION 1
Describe the contents of LabeM after the Commandl button is pressed.
a)
b)
c)
QUESTION 2
Based on the following screen design;
PURCHASE INFORMATION
Date:
JTV7/2010
Price Of Product:
JRM300.00
a)
Write the declaration statements for each of the variable on the screen design.
(4 marks)
b)
Write the formatted output display for each of the variable on the screen design.
(4 marks)
(Total: 8 marks)
CONFIDENTIAL
CONFIDENTIAL
AC/APR 2011/AIS150
QUESTION 3
Display the result for the following if a= 3, b=4 and c=5
a)
x = ( c - a ) b - a + ba
x = a*b + c/2
b)
c)
(2 marks)
(4 marks)
(4 marks)
(Total: 10 marks)
QUESTION 5
Write a VB program segment for each of the following problems:
a)
Find the sum of odd numbers from 1 to 20 by using do - loop until and display it in the
picture box.
(4 marks)
b)
Find the square numbers from 1 to 20 by using do - loop while and display it in the
picture box.
(4 marks)
c)
Find the sum of all numbers from 1 to 20 by using for., next and display it in the picture
box.
(4 marks)
(Total: 12 marks)
CONFIDENTIAL
AC/APR 2011/AIS150
CONFIDENTIAL
PARTC
This part consists of TWO (2) questions. Answer ALL questions and write your
answers in the answer booklet.
QUESTION 1
Write a VB program using IF statement that would perform the calculation and will display an
output shown as below.
PEE RAM LEE CINEMA TICKETING SYSTEM
Movie
! PopCom(RM4.00)
DoReMifRMG.OO)
C BujangLapok(RM7.00)
TOTAL CHARGE:
CALCULATE
EXIT
(13 marks)
CONFIDENTIAL
CONFIDENTIAL
10
AC/APR 2011/AIS150
QUESTION 2
Below is a table that provides the terms used by the National Weather Center to describe the
degree of cloudiness.
a)
You are required to sketch an interface where user will enter a percentage of cloud
cover and press a button to display the description. Include also Clear and Exit
command.
(4 marks)
b)
Write all coding for the command buttons. Using Select Case statement, write a
program that request the percentage of cloud as input and then displays the
appropriate descriptor. Prompt a Message Box for an invalid input.
(13 marks)
Percentage of cloud cover
<0
0-30
31-70
71-99
100
>100
Descriptor
Prompt Invalid Message
Clear
Partly cloudy
Cloudy
Overcast
Prompt Invalid Message
(Total: 17 marks)
CONFIDENTIAL