NEAR WESTERN VIEW HOSPITAL
PRACTICE EXAMINATION 2026
QUESTIONS WITH ANSWERS GRADED A+
◍ program design.
Answer: a written plan, an overview of the solution
◍ stepwise refinement.
Answer: breaking methods into smaller methods
◍ stub method.
Answer: dummy method called by another method being tested
◍ object-oriented programming.
Answer: using interacting objects
◍ Consider the following algorithms. Each algorithm operates on a list
containing n elements, where n is a very large integer.An algorithm that
accesses each element in the list twiceAn algorithm that accesses each
element in the list n timesAn algorithm that accesses only the first 10
elements in the list, regardless of the size of the listWhich of the algorithms
run in reasonable time?A: I onlyB: III onlyC: I and II onlyD: I, II, and III.
Answer: D: I, II, and III
◍ Which of the following is NOT an advantage of using open-source
software?A: Open-source software is generally free or lower in cost than
commercially available software.B: The availability of source code makes it
possible to customize open-source software to a user's individual needs.C:
The original developer of open-source software provides free or low-cost
support for users installing and running the software.D: Unlike commercial
, software, which can become obsolete when the company that created it goes
out of business, open-source software can be updated without the
involvement of the original programmers..
Answer: C: The original developer of open-source software provides free or
low-cost support for users installing and running the software.
◍ independent class.
Answer: doesn't use other classes of the program in its code
◍ A group of planners are using a simulation to examine whether or not a park
that they are designing is going to affect foot traffic in the area. The
simulation uses a model that includes input variables for the park such as the
number of entrances, sidewalks, and bike trails and the square footage of
open space (grassy areas). The simulation can then be run multiple times
using different values for the input variables to represent different park
designs.However, the simulation takes a very long time to run. The planners
update the model by removing some variables they consider less important
than others. Of the following, which is the most likely effect the updated
model will have on the simulation?A: The updated model is likely to
decrease the runtime of the simulation because the time required for
simulations generally depends on the complexity of the model used.B: The
updated model is likely to decrease the runtime of the simulation because
simulations that use older models tend to require more time to run than
simulations that use newer models.C: The updated model is unlikely to
decrease the runtime of the simulation because the simulation is
computationally complex, regardless of the model used.D: The updated
model is unlikely to provide any benefit because removing details from a
model will compromise the accuracy of the simulation..
Answer: A: The updated model is likely to decrease the runtime of the
simulation because the time required for simulations generally depends on
the complexity of the model used.
◍ Which of the following can be represented by a sequence of bits?An
integerAn alphanumeric characterA machine language instructionA: I
, onlyB: III onlyC: I and II onlyD: I, II, and III.
Answer: D: I, II, and III
◍ Assume that the list originalList contains integer values and that the list
newList is initially empty. The following code segment is intended to copy
all even numbers from originalList to newList so that the numbers in
newList appear in the same relative order as in originalList. The code
segment may or may not work as intended.Line 1: FOR EACH number IN
originalListLine 2: {Line 3: IF (number MOD 2 = 0)Line 4: {Line 5:
INSERT (newList, 1, number)Line 6: }Line 7: }Which of the following
changes, if any, can be made so that the code segment works as intended?A:
Changing line 1 to FOR EACH number IN newListB: Changing line 3 to IF
(number MOD 2 = 1)C: Changing line 5 to APPEND (newList, number)D:
No change is needed; the code segment is correct as is..
Answer: C: Changing line 5 to APPEND (newList, number)
◍ Consider a game in which a player flips a fair coin three times. If all three
coin flips have the same result (either all heads or all tails) the player wins.
Otherwise, the player loses.Which of the following code segments best
simulates the behavior of the game?A: B: C: D:.
Answer: Answer DCorrect. In this code segment, three coin flips are
simulated, where one result is represented by 1 and the other result is
represented by 0. The player wins when the sum of these is 0 or 3, indicating
all heads or all tails.
◍ A file storage application allows users to save their files on cloud servers. A
group of researchers gathered user data for the first eight years of the
application's existence. Some of the data are summarized in the following
graphs. The line graph on the left shows the number of registered users each
year. The line graph on the right shows the total amount of data stored by all
users each year. The circle graph shows the distribution of file sizes
currently stored by all users.Which of the following best describes the
average amount of data stored per user for the first eight years of the
application's existence?A: Across all eight years, the average amount of data