Chapter 19 Class-level variables are declared using the

subject Type Homework Help
subject Pages 3
subject Words 580
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 19: Parallel and Dynamic Universes (More on One-Dimensional Arrays)
TRUE/FALSE
1. In some applications, you may want to use an array to store items that are related but have different
data types, such as employee IDs and salary amounts.
2. All the data in an array do not have to be the same data type.
3. Variables and arrays are declared in procedures when the memory locations are needed only by the
procedure that declared them.
4. Two or more procedures in an application may need to use the same variable or array.
5. You declare class-level variables in the form’s Declarations section.
6. You declare a class-level memory location using the Dim keyword.
7. Class-level variables retain their values and remain in the computer’s internal memory until the
application ends.
8. You can determine the highest subscript in a one-dimensional array by subtracting 2 from the number
of array elements.
9. You should have each button’s Click event procedure determine the number of elements in an array.
10. For the array to be accessible by each button’s Click event procedure, it will need to be declared as a
class-level array.
11. At times, you may not know the precise number of array elements needed to store an application’s
data.
page-pf2
12. Although the ReDim statement allows you to make an array either larger or smaller, in most cases you
will use it to decrease the size of the array.
13. If you use the ReDim statement to reduce the size of an array, the values in the truncated elements are
saved.
MULTIPLE CHOICE
1. ____ arrays are two or more arrays whose elements are related by their position in the arrays.
a.
Parallel
c.
Equivalent
b.
Connected
d.
Comparable
2. The elements in a parallel array are related by their ____.
a.
classes
c.
superscripts
b.
data types
d.
subscripts
3. When two or more procedures in an application may need to use the same variable or array, you can
declare the memory locations in the form’s ____ section.
a.
Memory
c.
Declarations
b.
Storage
d.
Statements
4. Class-level variables are declared using the ____ keyword.
a.
Dim
c.
Private
b.
Public
d.
Class
5. ____ variables are recognized by every procedure contained in the form’s Code Editor window.
a.
Dim
c.
Program-level
b.
Local-level
d.
Class-level
6. Variables and arrays declared in a form’s Declarations section have ____ scope.
a.
class
c.
global
b.
program
d.
location
7. Variables declared in a form’s Declarations section are referred to as ____ variables.
page-pf3
a.
global
c.
class-level
b.
local-level
d.
program-level
8. The ____ statement is used when you know the exact number of times the loop instructions should be
processed.
a.
Do…While
c.
For…Until
b.
For…Next
d.
Do…Until
9. You can change the number of elements in an array while the application is running using the ____
statement.
a.
ReDo
c.
ReDim
b.
DoDim
d.
ReFit
10. The optional ____ keyword in the syntax of the ReDim statement tells the computer to keep the
current array values when the size of the array changes.
a.
Keep
c.
Save
b.
Protect
d.
Preserve
11. An array whose number of elements changes while an application is running is referred to as a(n) ____
array.
a.
dynamic
c.
active
b.
updating
d.
renewing
12. An empty array is an array that contains no ____.
a.
data
c.
memory
b.
indexes
d.
elements
13. An empty array is declared using an empty set of ____.
a.
slashes
c.
braces
b.
brackets
d.
curly braces

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.