FINAL CERTIFICATION SCRIPT 2026
QUESTIONS WITH SOLUTIONS
GRADED A+
◍ Decimal Number.
Answer: a base 10 number with ten possible different digits
◍ int[ ] arr = new int [10];which of the following code segments interchanges
the value of arr [0] and arr [5] ?.
Answer: int k = arr [0];arr [0]= arr [5];arr[5] = k;
◍ Binary Number.
Answer: a base 2 number with two possible different digits
◍ Which of the following best describes the conditions under which
methodOne and methodTwo return the same value?.
Answer: When a % b is equal to zero
◍ Assume that swap(arr, j, pos) exchanges the values of arr[j] and arr[pos].
Which of the following could be used to replace /* missing code */ so that
executing the code segment sorts the values in array arr?.
Answer: k = j - 1; k >= 0; k--
◍ Overflow Error.
Answer: Error from attempting to represent a number that is too large.
◍ /* missing code */System.out.print(result);Which of the following can be
used to replace /* missing code */ so that the code segment works as
intended?int result = 2 * n;result = result + 1;.
Answer: I only
, ◍ Round-off Error.
Answer: Error from attempting to represent a number that is too precise. The
value is rounded.
◍ Analog Data.
Answer: Data with values that change continuously, or smoothly, over time.
Some examples of analog data include music, colors of a painting, or
position of a sprinter during a race.
◍ x += values[j][k];}}What is the value of x after the code segment is
executed?.
Answer: 26
◍ Digital Data.
Answer: Data that changes discretely through a finite set of possible values
◍ The following code segment appears in a class other than ClassA or Class
B. ClassA obj = new ClassB();obj.showValue();What, if anything, is printed
when the code segment is executed?.
Answer: just B
◍ Sampling.
Answer: A process for creating a digital representation of analog data by
measuring the analog data at regular intervals called samples.
◍ A pair of number cubes is used in a game of chance. Each number cube has
six sides, numbered from 1 to 6, inclusive...int sum = / * missing code * /
;Which of the following replacements for /* missing code */ would best
simulate the value produced as a result of rolling two number cubes?.
Answer: 2 + (int) (Math.random() 6) + (int) (Math.random() 6)
◍ Lossless Compression.
Answer: A process for reducing the number of bits needed to represent
something without losing any information. This process is reversible.
◍ Lossy Compression.
Answer: A process for reducing the number of bits needed to represent