Deck 12: Structures and Sequential Files
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Match between columns
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
Play
Full screen (f)
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) Public
B) Private
C) Dim
D) As
A
2
The Exists method returns a(n) ____ value.
A) string
B) integer
C) Boolean
D) character
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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()
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
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
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