Introduction to Computer Science - D684 WGU
A collection of elements, each containing
What is a linked list?
a reference to the next element.
Which description best describes a
Last-in, first-out (LIFO) structure
stack?
What is the primary characteristic of a
There is FIFO access.
queue?
A sequence of program instructions that
What is a subprogram?
perform a specific task
In pseudocode, how would you call a
function named CalculateSum with two CalculateSum(a, b)
parameters a and b?
What is the primary purpose of using To allow for code reuse and better orga-
subprograms in a program? nization
Which operation is used to add an ele-
Push
ment to the top of a stack?
Which scenario is a stack most suitable
Managing tasks in a printer queue
for?
Which is an example of an integer data
42
type?
Which data type is used to represent
String
textual data?
Which variable name is valid in most pro-
variable_123
gramming languages?
Which statement correctly assigns the
x = 10
value 10 to the variable x?
Which is used for iteration in program-
While loop
ming?
What is the result of the expression 2 +
14
3 x 4?
Which operator has the highest prece-
x
dence?
Which value is a floating-point number? 3.14
, Introduction to Computer Science - D684 WGU
What is the result of the expression (2 +
20
3) x 4?
What is the main purpose of object-ori- To organize code into reusable compo-
ented programming (OOP)? nents called objects
Which statement describes a class in
A blueprint for creating objects
OOP?
The practice of keeping data and meth-
What is encapsulation in OOP? ods that manipulate the data in a single
unit
Which feature of OOP allows program-
mers to create new classes based on Inheritance
existing classes?
The ability of different objects to respond
What is polymorphism in OOP?
to the same method in different ways
Which keyword is used in many program-
ming languages to create a new instance New
of a class?
The organization of classes into a tree
What does the term "inheritance hierar-
structure based on inheritance relation-
chy" refer to in OOP?
ships
What does the term "object" refer to in An instance of a class containing attrib-
OOP? utes and methods
Which principle of OOP is demonstrated
by restricting access to certain parts of Encapsulation
an object?
The practice of hiding the complex imple-
What does the term "abstraction" refer to
mentation details and showing only the
in OOP?
necessary features
Which value is stored as an integer in
21
computer programming?
Which coding construct repeats a task
Iteration
while a condition is true?
The last item to be added becomes the
How are items accessed in a stack?
first item removed.
A collection of elements, each containing
What is a linked list?
a reference to the next element.
Which description best describes a
Last-in, first-out (LIFO) structure
stack?
What is the primary characteristic of a
There is FIFO access.
queue?
A sequence of program instructions that
What is a subprogram?
perform a specific task
In pseudocode, how would you call a
function named CalculateSum with two CalculateSum(a, b)
parameters a and b?
What is the primary purpose of using To allow for code reuse and better orga-
subprograms in a program? nization
Which operation is used to add an ele-
Push
ment to the top of a stack?
Which scenario is a stack most suitable
Managing tasks in a printer queue
for?
Which is an example of an integer data
42
type?
Which data type is used to represent
String
textual data?
Which variable name is valid in most pro-
variable_123
gramming languages?
Which statement correctly assigns the
x = 10
value 10 to the variable x?
Which is used for iteration in program-
While loop
ming?
What is the result of the expression 2 +
14
3 x 4?
Which operator has the highest prece-
x
dence?
Which value is a floating-point number? 3.14
, Introduction to Computer Science - D684 WGU
What is the result of the expression (2 +
20
3) x 4?
What is the main purpose of object-ori- To organize code into reusable compo-
ented programming (OOP)? nents called objects
Which statement describes a class in
A blueprint for creating objects
OOP?
The practice of keeping data and meth-
What is encapsulation in OOP? ods that manipulate the data in a single
unit
Which feature of OOP allows program-
mers to create new classes based on Inheritance
existing classes?
The ability of different objects to respond
What is polymorphism in OOP?
to the same method in different ways
Which keyword is used in many program-
ming languages to create a new instance New
of a class?
The organization of classes into a tree
What does the term "inheritance hierar-
structure based on inheritance relation-
chy" refer to in OOP?
ships
What does the term "object" refer to in An instance of a class containing attrib-
OOP? utes and methods
Which principle of OOP is demonstrated
by restricting access to certain parts of Encapsulation
an object?
The practice of hiding the complex imple-
What does the term "abstraction" refer to
mentation details and showing only the
in OOP?
necessary features
Which value is stored as an integer in
21
computer programming?
Which coding construct repeats a task
Iteration
while a condition is true?
The last item to be added becomes the
How are items accessed in a stack?
first item removed.