Study Guide
Field 081: Computer Science
Sample Selected-Response Questions
General Test Directions
This test consists of two sections: 1) a section with selected-response questions and 2) a constructed-response section.
Each question in the first section is a selected-response question with four answer choices. Read each question and answer choice carefully and choose the ONE best answer.
Try to answer all questions. Even if you are unsure of an answer, it is better to guess than not to answer a question at all. You will NOT be penalized for guessing.
The second section of this test consists of one constructed-response assignment. You will be asked to provide a written response to the assignment. Directions for completing your written response to the constructed-response assignment appear immediately before the assignment.
You may NOT use any type of calculator or reference materials during the test session.
Sample Selected-Response Questions
Competency 0002
Understand the characteristics and uses of productivity software.
1. A teacher is using layers to create an image file with a graphic design program. Using layers to create the image provides the teacher with the ability to:
- import the image file into another graphics program.
- save the layers in a file format that can be used in a Web page.
- create images that use a greater number of colors.
- edit the layers independently of each other.
Correct Response: D.
In a graphic design program, layers provide the ability to create the elements of an image separately so that each element can be manipulated and modified without affecting the others. When the elements are complete, the layers can be merged to incorporate all of the elements into a single image.
Competency 0003
Understand basic terminology related to computer architecture and characteristics of computer architecture.
2. Immediately after an arithmetic calculation is performed, the result of the calculation is stored in:
- the arithmetic logic unit.
- a data bus.
- the main memory.
- a register.
Correct Response: D.
Registers serve as temporary holding places for data being manipulated by the CPU. Registers hold the inputs to the arithmetic logic unit's circuitry and provide storage space for the results produced by that unit.
Competency 0004
Understand characteristics and functions of operating systems.
3. In a computer system, virtual memory is a technique that:
- compresses files so that more memory is available to a running application.
- allows available hard drive space to be used to supplement a computer's memory.
- permits unused read-only memory to be used by an application for temporary data storage.
- provides the ability to move information in and out of memory more quickly.
Correct Response: B.
Virtual memory is a method of extending the apparent size of a computer's random access memory (RAM) by swapping pages of data between RAM and the hard disk as needed.
Competency 0005
Understand types and characteristics of computer networks.
4. Which of the following is a characteristic of a client-server network?
- A host computer transfers data to client computers by means of a token of code.
- A host computer can be used only for tasks that cannot be performed by a client computer.
- Application files installed on a client computer can access data files stored on a host computer.
- All computers on a network can perform the duties of both a host and a client.
Correct Response: C.
In a client/server network, software applications installed on the client computers can access data files stored on the computer's hard drive or data files stored on the network server. Files stored on the server can be accessed by multiple network users.
Competency 0007
Understand principles and procedures for designing a program.
5. Which of the following is a defining characteristic of an overloaded method?
- A method takes more than one parameter.
- A method returns a value of a specific type.
- Methods with the same name take different numbers or types of parameters.
- Two or more methods are defined and implemented within the same class.
Correct Response: C.
Within a class, several methods may have the same name. A method can have any number of overloaded versions as long as their parameter lists differ in the number or types of parameters.
Competency 0008
Understand concepts and principles of modularization and data encapsulation in computer programming.
6. Which of the following actions best illustrates the principle of abstraction in object-oriented programming?
- assigning a value to a newly created object
- identifying the entities in a process with which a program interacts
- identifying the flow of control in a real-world system
- passing parameters from a method to the caller
Correct Response: B.
Abstraction refers to the principle of separating the description of program entities from their implementation. A program needs to know only an entity's name and description in order to interact with it; the program does not need to know an entity's implementation details.
Competency 0010
Understand principles and procedures for program development and implementation.
7. Which of the following is the best example of how UML is commonly used in computer programming?
- visualizing the components of an object-oriented software system
- creating a template for a graphical user interface
- checking for invalid input during program execution
- writing pseudocode specific to object-oriented languages
Correct Response: A.
UML is a visual language that includes a set of graphical notation techniques to create visual abstract models of object-oriented software systems.
Competency 0011
Understand types and characteristics of programming languages.
8. A significant difference between compilers and interpreters is that a compiler:
- generates error messages.
- creates an executable file.
- performs lexical analysis on the code.
- compares words in the program to a list of valid commands.
Correct Response: B.
A compiler is a program that reads the human-readable statements of a computer program and translates the statements into machine-readable object code that can then be executed. An interpreter translates and runs each program statement line by line.
Competency 0012
Understand types and characteristics of statements, operators, and control structures in high-level languages.
9. Use the code segment below to answer the question that follows.
switch (expression)
case (expA)
x = 1
break;
case (expB)
x = 2
break;
case (expC)
x = 3
break;
default: x = 0
Which of the following sets of statements is equivalent to the code segment shown above?
- If (expA) then x = 1 endif
If (expB) then x = 2 endif
If (expC) then x = 3 endif
x = 0 - If (expA) then x = 1 else x = 0 endif
If (expB) then x = 2 else x = 0 endif
If (expC) then x = 3 else x = 0 endif
- If (expA) then x = 1 else
If (expB) then x = 2 else
If (expC) then x = 3
endif
endif
endif
else x = 0 - If (expA) then x = 1 else
If (expB) then x = 2 else
If (expC) then x = 3 else x = 0
endif
endif
endif
Correct Response: D.
In the case statement, if case (exp A) is true, x is assigned the value of 1, execution of the case statement is finished, and case (exp B) and case (exp C) are not evaluated. If case (exp A) is not true, then the next case statement is evaluated. The same is true for case (exp B) and case (exp C). If the case is true, execution of the case statement is finished; otherwise program execution proceeds to the next case. This series of steps can be represented by a set of nested If … then … else statements with the value of x being assigned the value of 0 within the final else statement.
Competency 0013
Understand characteristics and applications of data types, structures, and abstraction mechanisms in high-level languages.
10. A programmer is writing an algorithm that needs to repeatedly access and remove the smallest number in a collection of numbers. Which of the following data structures will be most appropriate for the programmer to use to store the collection?
- heap
- stack
- linked list
- array
Correct Response: A.
A heap is a specialized tree-based data structure in which the root node always contains either the largest (max-heap) or smallest (min-heap) element in the list. Using a min-heap, the smallest element of the list is removed by removing the element at the root and reordering the remaining elements.