Exam Ce480uy

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

CE480UY

Computer Studies IV

YEAR 4

FINAL EXAMINATION

October/November 2020

Instructions to Candidates:

1. Time Allowed: 3 Hours.


2. Answer all questions in Section A and choose any Three question from Section B.
3. All questions carry 20 marks each.
4. Calculators are allowed provided they are not programmable.
5. No books, dictionaries, papers, cell phones or any other written materials are
allowed in this examination.
6. Candidates who break IUM examination regulations or commit any malpractice
will be disqualified from the examinations.

Total Marks: 100

Examiner: Mrs E. Nangolo


Section A (Answer all questions)

Question One

a) Write a program in Visual Basic to allow the user to input two integer values and then
the program print the results of multiplying and dividing among the two values.
See the example below:

1. Enter value1: 20.


2. Enter value2: 10.
3. The result of multiplying is 200.

4. The result of dividing is 2. (20 marks)

Question Two

a) Write a program in Visual Basic to ask a user to input his/her name, surname and age
then the output will be shown as an example below in a message box:
Your full name is: Sam Shivute!
You are: 28 years old! (20 marks)

[Total 40 Marks]

Section B (Choose three question)

Question One

a) With examples distinguish between each of the following pairs of terms used in
Visual Basic:

i. Arithmetic Operator and Relational Operator


ii. Assignment Instruction and Input Instruction
iii. Expression and Statement.
iv. Constant and Variable.
v. Remark and Declaration.

(4 marks each)

[Total 20 Marks]

1
Question Two

a) When developing software, a programmer may use a compiler or an interpreter.

i. Describe in detail the actions of a compiler.


ii. Explain the terms source code and object code (6 marks)

b) What is the purpose of Visual Basic? (4 marks)

c) Explain the following errors in Visual Basic with examples:


i. A syntax error
ii. A run-time error
iii. A logic error (10 marks)

[Total 20 Marks]

Question Three

a) Giving reasons choose a suitable data type for each of the details in an investor’s
deposit:

1. Investor’s name. E.g. Ms. Julia Alpheus


2. Investor’s date of birth. 25-03-1984
3. Investor’s mobile number. 0817857397
4. Amount of investment (N$). 54,000.60
5. Rate of interest (per cent). 5.88
6. Number of days for which amount invested. 14
7. Whether or not the investor is a new customer is true.
8. The day, month and year the investment starts. 25-06-2016
9. The time the investment starts. 10:00 am
10. The reference of the investment. AB1206-14.
(20 marks)

[Total 20 Marks]

2
Question Four

a) Calculate the values of Y1, Y2, Y3, Y4 and Y5 in the statements below, taking the
variables K = 3, L = 4, M = 12, N = 20, O= 2 and P = 3. Show all your calculations.

1. Y1 = K + L * M - N / O+ P

2. Y2 = (K + L) * M - N/ O + P

3. Y3 = (K + L) * (M - N) / O + P

4. Y4 = (K + L) * (M - N) / (O + P)

5. Y5 = (K + L) * M - N / (O + P) (20 marks)

[Total 20 Marks]

END OF QUESTION PAPER

You might also like