You are on page 1of 7

FACULTY OF COMPUTING AND INFORMATICS

DEPARTMENT OF SOFTWARE ENGINEERING

COURSE: INTRODUCTION TO COMPUTING COURSE CODE: ICG511S


LEVEL: 5 TEST
DATE: 2 MAY 2023 DURATION: 2 HOUR
Total MARKS: 70 ASSESSORS
MR. L. HAINGURA MR. A. TJIRARE
STUDENT NAME: STUDENT NUMBER:

GROUP LECTURER’S NAME: MODE OF STUDY:


FT

Group Number: PT

Page 1 of 7
INSTRUCTIONS TO STUDENTS:

1. Before you start, please fill in your details at the space provided.

2. Read all the questions, passages, scenarios, etc., carefully before answering.

3. Answer all the questions.

4. Number each answer clearly and correctly.

5. SECTION D: STRUCTURED QUESTIONS should be answered on the provided answer sheet. Write
your name and student number on each answer sheet.

6. Write neatly and legibly.

7. Making use of any crib notes may lead to disqualification and disciplinary action.

8. Use the allocated marks as a guideline when answering questions.

9. Looking at other students’ work is strictly prohibited.

10. This paper consists of seven (7) pages including the cover page.

Page 2 of 7
SECTION A: MULTIPLE CHOICE [5]

Select the correct choice by circling the correct letter next to the correct answer.

1. Given the variable mobileNumber, which naming convention is used?


A. Joined words casing
B. Underscore casing
C. Camel casing
D. None of the above

2. Given the flowchart below. If the condition evaluates to false in the first decision, which of the
following statements is true?

A. Sequential, Leading Decision Loop, Sequential


B. Sequential, Trailing Decision Loop, Sequential
C. Sequential, Repetition Decision Loop, Sequential
D. None of the above

3. Given the following Pseudocode, what will the output be if age is 45?

Page 3 of 7
A. 8
B. 16
C. 3
D. None of the above

4. Which of the following is not a data type?


A. Integer
B. Real
C. String
D. None of the above

5. Desk checking is also called


A. Beta checking
B. Alpha checking
C. Hand tracing
D. None of the above

SECTION B: TRUE OR FALSE [10]

State whether the statement is true or false at the provided space.

1. A constant is a value that cannot be altered by the program during normal execution: the
value stays the same._________
2. The logical AND operator can be used to unnest the nested if statement.______
3. When given a computational problem, it is essential to identify the inputs, processes, and
output required._________
4. Breaking down complex task into manageable tasks is called Abstraction.________
5. NOT(numberOfStudentsInICG511S < 400) is equivalent to this expression:
numberOfStudentsInICG511S ≥ 400______________
6. The degree of interdependence between the modules is known as cohesion.________
7. The degree of relationship between elements of the same module is known as
coupling.______________
8. In a void function, return is optional at the end of the function body, however, no return
values should appear following return.______________
9. The parameters in the function definition are called arguments where the function is
invoked._______________
10. A linear if statement with logical operators and range of values as test expressions can be
converted to a case structure._____________

Page 4 of 7
SECTION C: FILL IN THE GAP [8]

Select from the list below to fill in the missing word(s).

Array Data validation User Interface Variable End


Prompt For loop Initializing Start and End Declaration
True or False Endif Underscore File Data Outputting
Do-While loop Camel Casing Data Inputting Boolean Underscore

1. The variable naming conversion where a variable that starts with a lower-case letter and any
subsequent word starts with uppercase letter is known as _______________.
2. Declaring a variable with a starting value is known as _______________ the variable.
3. A _______________ is a statement that provides a data type and an identifier for a variable.
4. This message is displayed to the user of the program to solicit a response is known as
_______________.
5. In pseudocode notation, an _______________ in a decision structure is used to indicate
where the structure ends.
6. A _______________ is the name given to place in memory that holds a data value that
changes and designed to store a particular data item.
7. A _______________ is an elementary data item representing a control flag or switch that
may contain one of only two possible values.
8. The input data should match the data type definition stated at the beginning of the program.
This is a type of _______________ check.

SECTION D: STRUCTURED QUESTIONS [47]

STRUCTURED QUESTIONS should be answered on the provided answer sheet. Write your name and
student number on each answer sheet.

1. Give one distinct difference between the following repetition control structures:
While loop and Do-While loop. Draw a flowchart for each named repetition control
structure. Label the flowcharts accordingly to indicate which repetition control
structure you are illustrating. The flowchart symbols should be marked accordingly
with the following words: expression, statements, true, and false.
[6]

Page 5 of 7
2. Given the following pseudocode, rewrite it by replacing the case structure with a
linear if statement [6 marks]

Start
Prompt the user for the programming language you want to learn.
Get lang
Caseof(lang)
"JavaScript":
display"You can become a web developer.")
"Python":
display"You can become a Data Scientist."
"PHP":
display "You can become a backend developer."
"Solidity":
display "You can become a Blockchain developer."
"Java":
display "You can become a mobile app developer."
default:
display "The language doesn't matter, what matters is solving problems."
End case
End

3. Create a function called getBestStudent(), this function receives two parallel arrays,
one that has student numbers and another that keeps students’ semester average
marks, and their size (array length) as parameters.
This function should do the following:
a) Print the best performer’s semester average mark.
b) Return the best performer’s student number to the calling
body/function.
[12 Marks]

Page 6 of 7
4. Given the following scenario, please draw the appropriate flowchart.
The NDF is planning on recruiting existing members with at least three years of service
for the new fighter jet training in Brazil. In order to qualify, the NDF has set forth the
following criteria, all members should be Namibian citizens, have passed grade 12 with
at least 24 points. One of the NDF biggest challenge is to send mature enough
members that remain in the force for a long period and have thus agreed that their
age criteria should be between 30 and 40 to be eligible for the training in Brazil. Write
a program that will assist the NDF human resource personnel with the recruitment
process. [11 Marks]

5. According to the latest agreement, NWR increased their employees’ salaries based
on the table below.

Grade category Salary range /Month Increment

A 50000 and above 13%

B 30000-50000 7%

C 11000-20000 4.6%

D 5000-10000 2.5%

Create a pseudocode that reads an employee's salary and calculates the new salary
according to the above table. The pseudocode should further print out the new
salary and the grade category for that employee. [12 mark]

************************End of the Test*********************************

Page 7 of 7

You might also like