HOTSPOT
Instructions: For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct
selection is worth one point.
Hot Area:
Explanation:
A value type holds a data value within its own memory space while a reference type holds a pointer to the memory location
that holds the data.
Bool and char are value types; String is a reference type.
This question requires that you evaluate the underlined text to determine if it is correct.
The application type should be ClickOnce for an application that presents users with a graphical interface in which they can
enter data, and must run on computers that do not have network connectivity.
Instructions: Review the underlined text. If it makes the statement correct, select No change is needed. If the statement is
incorrect, select the answer choice that makes the statement correct.
D
You run the following code.
What will the value of the variable iResult be?
C
You have a table named ITEMS with the following fields:
ID (integer, primary key. auto generated)
Description (text)
Completed (Boolean)
You need to insert the following data in the table:
"Cheese", False
Which statement should you use?
D
Explanation:
The string values TRUE and FALSE can be converted to bit values: TRUE is converted to 1 and FALSE is converted to 0.
Incorrect:
Not B, not C: ID is autogenerated and should not be specified.
You create an object of type ANumber. The class is defined as follows.
The code is executed as follows.
What is the value of number after the code is executed?
D
HOTSPOT
You are reviewing the following class that is used to manage the results of a 5K race:
For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is
worth one point.
Hot Area:
You run the following code:
What is the value of result when the code has completed?
B
Explanation:
The conditional-OR operator (||) performs a logical-OR of its bool operands. If the first operand evaluates to true, the second
operand isn't evaluated. If the first operand evaluates to false, the second operator determines whether the OR expression
as a whole evaluates to true or false.
You have a class named Glass that inherits from a base class named Window. The Window class includes a protected
method named break().
How should you call the Glass class implementation of the break() method?
B
DRAG DROP
You are extending an application that stores and displays the results of various types of foot races. The application contains
the following definitions:
The following code is used to display the result for a race:
The contents of the console must be as follows:
99 seconds
1.65 minutes
You need to implement the FootRace class.
Match the method declaration to the method body. (To answer, drag the appropriate declaration from the column on the left
to its body on the right. Each declaration may be used once, more than once, or not at all. Each correct match is worth one
point.)
Select and Place:
You are developing an application that tracks tennis matches. A match is represented by the following class:
A match is created by using the following code:
How many times is the Location property on the newly created Match class assigned?
C
How does a console-based application differ from a Windows Store app?
B
DRAG DROP You are developing an application to display track and field race results.
The application must display the race results twice. The first time it must display only the winner and runner-up. The second
time it must display all participants. The code used to display results is shown below.
You need to implement the Rankings() function.
Complete the function to meet the requirements. (To answer, drag the appropriate code segment from the column on the left
to its location on the right. Each code segment may be used once, more than once, or not at all. Each correct match is worth
one point.)
Select and Place:
Explanation:
* You can use an Exit Function or Return statement to end the iteration. Return expression is required in a Function, Get, or
Operator procedure. Expression that represents the value to be returned to the calling code.
The following functions are defined:
What does the console display after the following line?
Printer(2)
B
HOTSPOT
You are reviewing the following code that saves uploaded images.
For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is
worth one point.
Hot Area:
You execute the following code.
What will the variable iResult be?
B