Font size
WorksheetsICTC0613 - Midterms Exam
Total questions: 30
Worksheet time: 44mins
In creating objects, what would be the first step?
Termination
Initialization
Declaration
Instantiation
A finite set of instructions to be carried out in order to solve a specific problem
Algorithm
Abstract Data Type
Data Type
Data Structure
Algorithm can be written in a form of pseudocode
True
False
The elements of an array are stored in an _______.
item
index
value
appendix
Abstract data types cannot be implemented in different programming languages
True
False
An object is not described as the basic unit of OOP
True
False
When data is manipulated by operations, information is formed as a result.
True
False
ADT is composed of data structures and operations.
True
False
Type of variable that is declared inside methods, constructors, or blocks.
Local Variable
Instance Variable
Data Variable
Class Variable
A property of algorithm which states that, each instruction must be clear
Scope of definition
Finiteness
Input and Output Definition
Absence of ambiguity
In order to interact with one another, the methods pass arguments.
True
False
(a) refers to the data properties of an object.
A loop repeats a block of codes until it meets a certain condition. Each execution of a loop’s body is called (a) .
A feature of OOP in which it hides the complexities of a software, and shows only the necessary functions to the user.
Behavior
Encapsulation
Abstraction
Polymorphism
To create or form programs, data structure and algorithm must be used
True
False
A programming technique that binds the class members together and prevents them from being accessed by other classes.
Attributes
Encapsulation
Abstraction
Initialization
In the essence of OOP, what are the behaviors of a car
drive(), submerge(), park(), reverse(), neutral
park(), reverse(), neutral(), drive(), low()
high(), low(), drive(), park()
drive(), reverse(), walk(), park()
Two elements of recursion.
basis, iteration
basis, recursive step
recursive step, method call
recursive call, method call
(a) refers to a set of statements group together to do a specific task.
If the factorial of n is the product of all positive non-zero numbers less than or equl to n, then the value of n should be?
n=0
n≥0
n2=0
n !=0
It refers to the step or call which solves the problem using the smaller version of itself.
method call
recursive call
iterative call
loop
Three types of linked list.
doubly, multiply, circularly
singly, doubly, circularly
singly, doubly, circular
singly, doubly, looply
Complete the code based on the given image. Write the missing piece of code or character.
(a)
The elements in a linked list are called _____.
index
values
base
nodes
The structure of a node in a linked list consist of:
data, node
link, node
data, link
node, code
A data type reference under one name which can contain multiple values.
index
element
array
length
What is the length of the array names?
5
6
7
8
What would be the output of this code?
6
8
9
12
To select "Thoma" from the array surname, what should be the index in the print code?
surname[2]
surname[0][2]
surname[2][1]
surname[2][0]
What would be the output of the code if the product code is 2?
tofu, 11.50
pork chop, 40.59
donut, 10.20
sardines, 12.56
