Deck 12: Structures and Sequential Files

Full screen (f)
exit full mode
Question
In a Structure statement, each member variable's definition contains the keyword ____ followed by the variable's name.

A) Public
B) Private
C) Dim
D) As
Use Space or
up arrow
down arrow
to flip the card.
Question
The Exists method returns a(n) ____ value.

A) string
B) integer
C) Boolean
D) character
Question
Sending data to a file is referred to as ____ the file.

A) interfacing with
B) burning
C) reading
D) writing to
Question
The only time that a form's FormClosing event occurs is when the user clicks the Close button on the form's title bar.
Question
You refer to a member variable in an array element using the syntax ____.

A) arrayName.memberVariableName(subscript)
B) arrayName(subscript) . memberVariableName
C) arrayName(memberVariableName)(subscript)
D) arrayName(subscript).variables(memberVariableName)
Question
The Structure statement ends with the ____ keyword(s).

A) Stop Structure
B) Exit Structure
C) End
D) End Structure
Question
In most cases, an application will not need to read each line of text contained in a sequential access file.
Question
A form's ____ event occurs when a form is about to be closed.

A) FormClosing
B) Exiting
C) FormExit
D) FormEnding
Question
Programmers use ____ to group related items into one unit.

A) members
B) constants
C) scalar variables
D) structures
Question
In Visual Basic, you use a ____ object to read data from a sequential access file.

A) StreamReaderWriter
B) StreamWriter
C) StreamRandom
D) StreamReader
Question
A class-level structure variable is declared using the keyword ____.

A) Dim
B) Private
C) Public
D) Structure
Question
The members included in a structure can be variables, constants, or procedures.
Question
A sequential access file is often referred to as a ____ file.

A) text
B) random
C) binary
D) byte
Question
The PadLeft and PadRight methods pad a string with a character until the string is a specified length.
Question
You can create your own data types in Visual Basic using the ____ statement.

A) Call
B) Structure
C) Data
D) Assignment
Question
The "____" filename extension typically is used when naming sequential access files.

A) ini
B) txt
C) wri
D) rtf
Question
You can use a structure to declare a variable.
Question
You can write data to a sequential access file using the ____ method.

A) Save
B) Write
C) Append
D) Open
Question
Getting data from a file is referred to as ____ the file.

A) interfacing with
B) burning
C) reading
D) writing to
Question
The ____ method can be used to avoid the run time error that occurs when the computer cannot locate an input file..

A) Check
B) File
C) Exists
D) Ready
Question
Explain what it means to access data sequentially from a sequential access file.
Question
Data types created by the Structure statement are referred to as ____________________ data types.
Question
Under what situations does a form's FormClosing event occur?
Question
A(n) ____ is a group of related fields that contain all of the necessary data about a specific person, place, or thing.

A) record
B) table
C) column
D) entity
Question
When using the ____________________ method, the next character written to a file will appear on the line immediately below the string.
Question
Variables included in a structure are referred to as ____________________ variables.
Question
Which of the following statements removes the first item from the booksList box?

A) booksListBox.Remove(0)
B) booksListBox.RemoveAt(1)
C) booksListBox.Items.RemoveAt(0)
D) booksListBox.Items.RemoveAt(1)
Question
Suppose a structure variable named manager contains a salary member variable. Write a statement that multiplies the contents of the salary member variable by 1.05 , and then assigns the result to the member variable.
Question
Explain what a delimiter character is used for.
Question
Variables declared using a structure are often referred to as ____________________ variables.
Question
A(n) ____ is a single item of information about a person, place, or thing.

A) table
B) entity
C) field
D) attribute
Question
You should use the ____________________ method to close an output sequential access file as soon as you are finished using it.
Question
Write a statement to declare a class-level variable named salaried of a structure named Employee .
Question
You can prevent the computer from closing a form by setting the Cancel property of the FormClosing procedure's ____ parameter to True .

A) form
B) e
C) load
D) start
Question
When using the Exists method for determining whether a file exists, explain what happens if you do not include a folder path.
Question
A form's FormClosing event can occur when the computer processes the ____ statement in the form's code.

A) My.Computer.Close()
B) MyComputer.Close()
C) Me.Close()
D) My.Close()
Question
Write a statement to declare a procedure-level variable named manager of a structure named Employee .
Question
You can use the ____ method to write a specific number of space characters in a string.

A) Strings.Space
B) Strings.Write
C) Strings.Character
D) Strings.Add
Question
Describe the advantage of passing a structure variable to a procedure.
Question
Explain the difference between a field and a record and provide an example of each.
Question
Match between columns
A file that is read by a computer.
structure
A file that is read by a computer.
dot member access operator
A file that is read by a computer.
input file
A file that is read by a computer.
output file
A file that is read by a computer.
AppendText
A file that is read by a computer.
field
A file that is read by a computer.
record
A file that is read by a computer.
Dim
A file that is read by a computer.
Private
Used to separate the structure variable's name from the member variable's name.
structure
Used to separate the structure variable's name from the member variable's name.
dot member access operator
Used to separate the structure variable's name from the member variable's name.
input file
Used to separate the structure variable's name from the member variable's name.
output file
Used to separate the structure variable's name from the member variable's name.
AppendText
Used to separate the structure variable's name from the member variable's name.
field
Used to separate the structure variable's name from the member variable's name.
record
Used to separate the structure variable's name from the member variable's name.
Dim
Used to separate the structure variable's name from the member variable's name.
Private
Used to declare a class-level structure variable.
structure
Used to declare a class-level structure variable.
dot member access operator
Used to declare a class-level structure variable.
input file
Used to declare a class-level structure variable.
output file
Used to declare a class-level structure variable.
AppendText
Used to declare a class-level structure variable.
field
Used to declare a class-level structure variable.
record
Used to declare a class-level structure variable.
Dim
Used to declare a class-level structure variable.
Private
A user-defined data type.
structure
A user-defined data type.
dot member access operator
A user-defined data type.
input file
A user-defined data type.
output file
A user-defined data type.
AppendText
A user-defined data type.
field
A user-defined data type.
record
A user-defined data type.
Dim
A user-defined data type.
Private
A file to which information is written.
structure
A file to which information is written.
dot member access operator
A file to which information is written.
input file
A file to which information is written.
output file
A file to which information is written.
AppendText
A file to which information is written.
field
A file to which information is written.
record
A file to which information is written.
Dim
A file to which information is written.
Private
A single item of information about a person, place, or thing
structure
A single item of information about a person, place, or thing
dot member access operator
A single item of information about a person, place, or thing
input file
A single item of information about a person, place, or thing
output file
A single item of information about a person, place, or thing
AppendText
A single item of information about a person, place, or thing
field
A single item of information about a person, place, or thing
record
A single item of information about a person, place, or thing
Dim
A single item of information about a person, place, or thing
Private
Used to create a procedure-level structure variable.
structure
Used to create a procedure-level structure variable.
dot member access operator
Used to create a procedure-level structure variable.
input file
Used to create a procedure-level structure variable.
output file
Used to create a procedure-level structure variable.
AppendText
Used to create a procedure-level structure variable.
field
Used to create a procedure-level structure variable.
record
Used to create a procedure-level structure variable.
Dim
Used to create a procedure-level structure variable.
Private
New data is written after existing data in the file
structure
New data is written after existing data in the file
dot member access operator
New data is written after existing data in the file
input file
New data is written after existing data in the file
output file
New data is written after existing data in the file
AppendText
New data is written after existing data in the file
field
New data is written after existing data in the file
record
New data is written after existing data in the file
Dim
New data is written after existing data in the file
Private
Contains all of the necessary data about a specific person, place, or thing
structure
Contains all of the necessary data about a specific person, place, or thing
dot member access operator
Contains all of the necessary data about a specific person, place, or thing
input file
Contains all of the necessary data about a specific person, place, or thing
output file
Contains all of the necessary data about a specific person, place, or thing
AppendText
Contains all of the necessary data about a specific person, place, or thing
field
Contains all of the necessary data about a specific person, place, or thing
record
Contains all of the necessary data about a specific person, place, or thing
Dim
Contains all of the necessary data about a specific person, place, or thing
Private
Question
What is the Split function used for?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 12: Structures and Sequential Files
1
In a Structure statement, each member variable's definition contains the keyword ____ followed by the variable's name.

A) Public
B) Private
C) Dim
D) As
A
2
The Exists method returns a(n) ____ value.

A) string
B) integer
C) Boolean
D) character
C
3
Sending data to a file is referred to as ____ the file.

A) interfacing with
B) burning
C) reading
D) writing to
D
4
The only time that a form's FormClosing event occurs is when the user clicks the Close button on the form's title bar.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
You refer to a member variable in an array element using the syntax ____.

A) arrayName.memberVariableName(subscript)
B) arrayName(subscript) . memberVariableName
C) arrayName(memberVariableName)(subscript)
D) arrayName(subscript).variables(memberVariableName)
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
The Structure statement ends with the ____ keyword(s).

A) Stop Structure
B) Exit Structure
C) End
D) End Structure
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
In most cases, an application will not need to read each line of text contained in a sequential access file.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
A form's ____ event occurs when a form is about to be closed.

A) FormClosing
B) Exiting
C) FormExit
D) FormEnding
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
Programmers use ____ to group related items into one unit.

A) members
B) constants
C) scalar variables
D) structures
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
In Visual Basic, you use a ____ object to read data from a sequential access file.

A) StreamReaderWriter
B) StreamWriter
C) StreamRandom
D) StreamReader
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
A class-level structure variable is declared using the keyword ____.

A) Dim
B) Private
C) Public
D) Structure
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
The members included in a structure can be variables, constants, or procedures.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
A sequential access file is often referred to as a ____ file.

A) text
B) random
C) binary
D) byte
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
The PadLeft and PadRight methods pad a string with a character until the string is a specified length.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
You can create your own data types in Visual Basic using the ____ statement.

A) Call
B) Structure
C) Data
D) Assignment
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
The "____" filename extension typically is used when naming sequential access files.

A) ini
B) txt
C) wri
D) rtf
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
You can use a structure to declare a variable.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
You can write data to a sequential access file using the ____ method.

A) Save
B) Write
C) Append
D) Open
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
Getting data from a file is referred to as ____ the file.

A) interfacing with
B) burning
C) reading
D) writing to
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
The ____ method can be used to avoid the run time error that occurs when the computer cannot locate an input file..

A) Check
B) File
C) Exists
D) Ready
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
Explain what it means to access data sequentially from a sequential access file.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
Data types created by the Structure statement are referred to as ____________________ data types.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
Under what situations does a form's FormClosing event occur?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
A(n) ____ is a group of related fields that contain all of the necessary data about a specific person, place, or thing.

A) record
B) table
C) column
D) entity
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
When using the ____________________ method, the next character written to a file will appear on the line immediately below the string.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
Variables included in a structure are referred to as ____________________ variables.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following statements removes the first item from the booksList box?

A) booksListBox.Remove(0)
B) booksListBox.RemoveAt(1)
C) booksListBox.Items.RemoveAt(0)
D) booksListBox.Items.RemoveAt(1)
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
Suppose a structure variable named manager contains a salary member variable. Write a statement that multiplies the contents of the salary member variable by 1.05 , and then assigns the result to the member variable.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
Explain what a delimiter character is used for.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
Variables declared using a structure are often referred to as ____________________ variables.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
A(n) ____ is a single item of information about a person, place, or thing.

A) table
B) entity
C) field
D) attribute
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
You should use the ____________________ method to close an output sequential access file as soon as you are finished using it.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
Write a statement to declare a class-level variable named salaried of a structure named Employee .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
You can prevent the computer from closing a form by setting the Cancel property of the FormClosing procedure's ____ parameter to True .

A) form
B) e
C) load
D) start
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
When using the Exists method for determining whether a file exists, explain what happens if you do not include a folder path.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
A form's FormClosing event can occur when the computer processes the ____ statement in the form's code.

A) My.Computer.Close()
B) MyComputer.Close()
C) Me.Close()
D) My.Close()
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
Write a statement to declare a procedure-level variable named manager of a structure named Employee .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
You can use the ____ method to write a specific number of space characters in a string.

A) Strings.Space
B) Strings.Write
C) Strings.Character
D) Strings.Add
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
Describe the advantage of passing a structure variable to a procedure.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
Explain the difference between a field and a record and provide an example of each.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
A file that is read by a computer.
structure
A file that is read by a computer.
dot member access operator
A file that is read by a computer.
input file
A file that is read by a computer.
output file
A file that is read by a computer.
AppendText
A file that is read by a computer.
field
A file that is read by a computer.
record
A file that is read by a computer.
Dim
A file that is read by a computer.
Private
Used to separate the structure variable's name from the member variable's name.
structure
Used to separate the structure variable's name from the member variable's name.
dot member access operator
Used to separate the structure variable's name from the member variable's name.
input file
Used to separate the structure variable's name from the member variable's name.
output file
Used to separate the structure variable's name from the member variable's name.
AppendText
Used to separate the structure variable's name from the member variable's name.
field
Used to separate the structure variable's name from the member variable's name.
record
Used to separate the structure variable's name from the member variable's name.
Dim
Used to separate the structure variable's name from the member variable's name.
Private
Used to declare a class-level structure variable.
structure
Used to declare a class-level structure variable.
dot member access operator
Used to declare a class-level structure variable.
input file
Used to declare a class-level structure variable.
output file
Used to declare a class-level structure variable.
AppendText
Used to declare a class-level structure variable.
field
Used to declare a class-level structure variable.
record
Used to declare a class-level structure variable.
Dim
Used to declare a class-level structure variable.
Private
A user-defined data type.
structure
A user-defined data type.
dot member access operator
A user-defined data type.
input file
A user-defined data type.
output file
A user-defined data type.
AppendText
A user-defined data type.
field
A user-defined data type.
record
A user-defined data type.
Dim
A user-defined data type.
Private
A file to which information is written.
structure
A file to which information is written.
dot member access operator
A file to which information is written.
input file
A file to which information is written.
output file
A file to which information is written.
AppendText
A file to which information is written.
field
A file to which information is written.
record
A file to which information is written.
Dim
A file to which information is written.
Private
A single item of information about a person, place, or thing
structure
A single item of information about a person, place, or thing
dot member access operator
A single item of information about a person, place, or thing
input file
A single item of information about a person, place, or thing
output file
A single item of information about a person, place, or thing
AppendText
A single item of information about a person, place, or thing
field
A single item of information about a person, place, or thing
record
A single item of information about a person, place, or thing
Dim
A single item of information about a person, place, or thing
Private
Used to create a procedure-level structure variable.
structure
Used to create a procedure-level structure variable.
dot member access operator
Used to create a procedure-level structure variable.
input file
Used to create a procedure-level structure variable.
output file
Used to create a procedure-level structure variable.
AppendText
Used to create a procedure-level structure variable.
field
Used to create a procedure-level structure variable.
record
Used to create a procedure-level structure variable.
Dim
Used to create a procedure-level structure variable.
Private
New data is written after existing data in the file
structure
New data is written after existing data in the file
dot member access operator
New data is written after existing data in the file
input file
New data is written after existing data in the file
output file
New data is written after existing data in the file
AppendText
New data is written after existing data in the file
field
New data is written after existing data in the file
record
New data is written after existing data in the file
Dim
New data is written after existing data in the file
Private
Contains all of the necessary data about a specific person, place, or thing
structure
Contains all of the necessary data about a specific person, place, or thing
dot member access operator
Contains all of the necessary data about a specific person, place, or thing
input file
Contains all of the necessary data about a specific person, place, or thing
output file
Contains all of the necessary data about a specific person, place, or thing
AppendText
Contains all of the necessary data about a specific person, place, or thing
field
Contains all of the necessary data about a specific person, place, or thing
record
Contains all of the necessary data about a specific person, place, or thing
Dim
Contains all of the necessary data about a specific person, place, or thing
Private
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
What is the Split function used for?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.