How can we help?

You can also find more resources in our Help Center.

101 terms

Visual BASIC Final Exam Study Cards

CIT 163 at Columbus State Community College Final Exam Study Cards
STUDY
PLAY
Question 1

A database may contain more than one table.

True
False
Question 1

A database may contain more than one table.
Answer

Correct Answer: True
Question 2
When you are working with an array, the easiest way to traverse the elements is to use the _______. A If / Then statement

Next statement

For Each / Next statement

Case structure
Question 2

When you are working with an array, the easiest way to traverse the elements is to use the _______.
A If / Then statement

Correct Answer:
Case structure
Question 3

_______ refers to the combination of characteristics of an object along with its behaviors. refers to

Reusability

Inheritance

Encapsulation

Polymorphism
Question 3

_______ refers to the combination of characteristics of an object along with its behaviors. refers to

Correct Answer:
Encapsulation
Question 4

An array is a list or series of values.

True
False
Question 4

An array is a list or series of values.


Correct Answer: True
Question 5


A library keeps track of all of the books a database file. Author, Title, and Subject are _______ in the database table.

files

records

fields

keys
Question 5

A library keeps track of all of the books a database file. Author, Title, and Subject are _______ in the database table.


Correct Answer:
fields
Question 6

When an array is initialized with the Dim Statement, the index starts at 1 instead of 0.
True
False
Question 6

When an array is initialized with the Dim Statement, the index starts at 1 instead of 0.


Correct Answer: False
Question 7

Setting the BooleanAppend argument to True in the StreamWriter constructor _______.


will create a new data file

is used to add data to existing data files

adds data to the beginning of an existing data file

reads data previously stored on disk
Question 7

Setting the BooleanAppend argument to True in the StreamWriter constructor _______.


Correct Answer:
is used to add data to existing data files
Question 8


Properties are actions that can be performed by a class of object.
True
False
Question 8

Properties are actions that can be performed by a class of object.


Correct Answer: False
Question 9

The acronym OOP stands for _______.


Object Ordering Programs

Other Object Procedures

Object Organized Projects

Object Oriented Programming
Question 9

The acronym OOP stands for _______.


Correct Answer:
Object Oriented Programming
Question 10


The identifier for a loop index in a For/Next statement must be loopIndexInteger.

True
False
Answer10


The identifier for a loop index in a For/Next statement must be loopIndexInteger.

Correct Answer: False
Question 11

A SQL Server Express file has a(n) _______ file extension.


adb

mdb

mdf

net
Answer11

A SQL Server Express file has a(n) _______ file extension.


Correct Answer:
mdf
Question 12
The data files that are presented in Chapter 11, Saving Data in Files, are commonly used to store large amounts of data.

True
False
Answer12
The data files that are presented in Chapter 11, Saving Data in Files, are commonly used to store large amounts of data.

Correct Answer: False
Question 13


What will be the value of valueInteger after execution of these statements?
For indexInteger = 1 to 10 Step 2
valueInteger += indexInteger
Next indexInteger


20

25

36

None of the above.
Answer13
What will be the value of valueInteger after execution of these statements?
For indexInteger = 1 to 10 Step 2
valueInteger += indexInteger
Next indexInteger

Correct Answer:
25
Question 14


Add a class module to a project by _______.


selecting Add Class from the Project menu

right-clicking on the project name and selecting Properties

clicking on a Class object in the Toolbox

right-clicking on the user interface and selecting Add Class from the menu
Answer14


Add a class module to a project by _______.

Correct Answer:
selecting Add Class from the Project menu
Question 15

Which text box event occurs when a text box gets the focus?

Click event

Enter event

Leave event

TextChanged event
Answer15

Which text box event occurs when a text box gets the focus?


Correct Answer:
Enter event
Question 16
A StreamWriter object can be declared in the Declarations section of a program or in a procedure.
True
False
Answer16
A StreamWriter object can be declared in the Declarations section of a program or in a procedure.

Correct Answer: True
Question 17


Items in a list can be placed in alphabetical order by _______.


setting the Sorted property to True

selecting the item in the list and then using the arrow keys to move the item up or down the list

setting the Alphabetize property to True

setting the Index property to 1
Answer17


Items in a list can be placed in alphabetical order by _______.

Correct Answer:
setting the Sorted property to True
Question 18


When does a For/Next statement terminate iteration?


When executing the For statement, the counter must be greater than the final value

When executing the For statement, the counter must be the same as the final value

When executing the Next statement, the counter must be greater than the final value

When executing the Next statement, the counter must be the same as the final value
Answer18


When does a For/Next statement terminate iteration?


Correct Answer:
When executing the For statement, the counter must be greater than the final value
Question 19

When using inheritance, you can call the base class constructor with this code: _______.


BaseClass.Inherit()

Inherit.Base()

MyBase.New()

New.BaseClass()
Answer19

When using inheritance, you can call the base class constructor with this code: _______.


Correct Answer:
MyBase.New()
Question 20

It is possible to add values to a list box or combo box during design by using the Items property.
True
False
Answer20

It is possible to add values to a list box or combo box during design by using the Items property.

Correct Answer: True
Question 21

The Peek method reads the next data element in a data file.
True
False
Answer21

The Peek method reads the next data element in a data file.

Correct Answer: False
Question 22

Items can be added to a list during run time using the _________ method.


AddLists

Lists

ItemsAdd

Items.Add
Answer22

Items can be added to a list during run time using the _________ method.


Correct Answer:
Items.Add
Question 23


Each row in a database table represents a _______.

file
field
record
key field
Answer23


Each row in a database table represents a _______.

Correct Answer:
record
Question 24


Skip to the next iteration of a Do loop with the _______ statement.

Exit For
Exit Do
Continue For
Continue Do
Answer24


Skip to the next iteration of a Do loop with the _______ statement.


Correct Answer:
Continue Do
Question 25
Which of the following windows can be used to add a new data source?

Solution Explorer
Properties
Data Connector
Data Sources
Answer25

Which of the following windows can be used to add a new data source?

Correct Answer:
Data Sources
Question 26
A preschool has decided to computerize its information about each of the students. A file will be created to store the data. All of the information about one student is stored in one _______.

file
record
field
key field
Answer26

A preschool has decided to computerize its information about each of the students. A file will be created to store the data. All of the information about one student is stored in one _______.

Correct Answer:
record
Question 27


The SelectedIndex property of the first item in a list is _______.

-1
0
1
True
Answer27

The SelectedIndex property of the first item in a list is _______.


Correct Answer: 0
Question 28
The values of Boolean data types are referred to as _______.
banners
flags
ribbons
posters
Answer28
The values of Boolean data types are referred to as _______.

Correct Answer:
flags
Question 29
The code to delete the selected item from colorListBox is _______.

colorListBox.Clear

colorListBox.RemoveItem

colorListBox.Delete (colorListBox.ListIndex)

colorListBox.Items.RemoveAt (colorListBox.SelectedIndex)
Answer29
The code to delete the selected item from colorListBox is _______.

Correct Answer:
colorListBox.Items.RemoveAt (colorListBox.SelectedIndex)
Question 30
How many times will the statements inside this For/Next loop be executed?
For indexInteger = 1 to 10
'Statements in loop
Next indexInteger

5

11

9

10
Answer30
How many times will the statements inside this For/Next loop be executed?
For indexInteger = 1 to 10
'Statements in loop
Next indexInteger

Correct Answer: 10
Question 31
The StreamWriter's WriteLine method places an Enter (carriage return) between the items in the data file.
True
False
Answer31
The StreamWriter's WriteLine method places an Enter (carriage return) between the items in the data file.

Correct Answer: True
Question 32
What is the value of indexInteger after the code in the loop below is completed?
For indexInteger = 1 to 10
'Statements in loop
Next indexInteger

0

1

10

11
Answer32
What is the value of indexInteger after the code in the loop below is completed?
For indexInteger = 1 to 10
'Statements in loop
Next indexInteger

Correct Answer: 11
Question 33

_______ refers to data hiding.

Encapsulation
Instantiation
Inheritance
Polymorphism
Answer33

_______ refers to data hiding.


Correct Answer:
Encapsulation
Question 34

When is the counter tested in a FOR/NEXT statement?


In the NEXT statement

In the FOR statement

When the counter is initialized

When the counter is incremented
Answer34

When is the counter tested in a FOR/NEXT statement?


Correct Answer:
In the FOR statement
Question 35

A class allows its properties to be retrieved through _______.

a Let block

a Get accessor method

a Set accessor method

The New keyword
Answer35

A class allows its properties to be retrieved through _______.

Correct Answer:
a Get accessor method
Question 36

_______ are small samples of code that can show you how to accomplish many programming tasks and they are available from the context menu in the Editor window.

SDI's

ToolStrips

Quickcodes

Code snippets
Answer36

_______ are small samples of code that can show you how to accomplish many programming tasks and they are available from the context menu in the Editor window.

Correct Answer:
Code snippets
Question 37

If you intend to write data to an existing data file and it is your intention to overwrite all of the data in a file, you should _______.

set the BooleanAppend argument of the StreamWriter constructor to True

not include the BooleanAppend argument in the StreamWriter constructor

set the BooleanAppend argument of the StreamWriter to False

Both s B and C are correct
Answer37

If you intend to write data to an existing data file and it is your intention to overwrite all of the data in a file, you should _______.

Correct Answer:
Both answers B and C are correct
Question 38

What does ADO stand for?

Advanced Data Objects
Active Data Objects
ActiveX Directory Objects
ActiveX Data Objects
Answer38

What does ADO stand for?

Correct Answer:
ActiveX Data Objects
Question 39
Which of the following steps does not necessarily occur when writing data to a data file?

A new StreamWriter object must be declared

The StreamWriter's WriteLine method will create a buffer in memory

A new data file will always be created when a StreamWriter is declared

The data to be written will be converted to string data
Answer39

Which of the following steps does not necessarily occur when writing data to a data file?

Correct Answer:
A new data file will always be created when a StreamWriter is declared
Question 40

A new data file will be created if the filename does not exist when declaring a new StreamWriter object.
True
False
Answer40

A new data file will be created if the filename does not exist when declaring a new StreamWriter object.

Correct Answer: True
Question 41

To remove an individual item from a list box, you can use the Remove method and specify the index of the item.
True
False
Answer41

To remove an individual item from a list box, you can use the Remove method and specify the index of the item.


Correct Answer: False
Question 42

The _______ property of a text box can be used to control the number of characters the user can type into the box.

Length
InputCharacters
CharacterCasing
MaxLength
Answer42

The _______ property of a text box can be used to control the number of characters the user can type into the box.

Correct Answer:
MaxLength
Question 43
The _______ component can be used to validate user input. It will display a flashing icon and display a tooltip style message to the user.
Validation
Validate
Error
ErrorProvider
Answer43
The _______ component can be used to validate user input. It will display a flashing icon and display a tooltip style message to the user.

Correct Answer:
ErrorProvider
Question 44


Use the _______ in order to sort the data in a combo box.


Sorted property

QueryBuilder

Data Connector

Data Sources
Answer44

Use the _______ in order to sort the data in a combo box.

Correct Answer:
QueryBuilder
Question 45

In the statement phoneStreamWriter.WriteLine(nameTextBox.Text); nameTextBox.Text refers to _______.

the record number

the variable which will store the data in nameTextBox

the data file number

the object that contains the data that will be written to disk
Answer45

In the statement phoneStreamWriter.WriteLine(nameTextBox.Text); nameTextBox.Text refers to _______.

Correct Answer:
the object that contains the data that will be written to disk
Question 46

The _______ method is used to send a line of text to the graphics page.

DrawString

WriteLine

String

Print
Answer46

The _______ method is used to send a line of text to the graphics page.

Correct Answer:
DrawString
Question 47


The value of a property in a class module can be retrieved through the Get accessor method in the Property procedure.
True
False
Answer47

The value of a property in a class module can be retrieved through the Get accessor method in the Property procedure.

Correct Answer: True
Question 48

Which one of the following is NOT a component that appears in the component tray after a DataGridView control has been connected to a data source?

DataSet

BindingSource

TableAdapter

DataNavigator
Answer48

Which one of the following is NOT a component that appears in the component tray after a DataGridView control has been connected to a data source?

Correct Answer:
DataNavigator
Question 49

Each individual variable in an array is called a "member" of the array.
True
False
Answer49

Each individual variable in an array is called a "member" of the array.

Correct Answer: False
Question 50


Creating a class module defines a new class; it does not create any objects.
True
False
Answer50

Creating a class module defines a new class; it does not create any objects.

Correct Answer: True
Question 51

The Get accessor method _______.

retrieves the current value of a property

allows you to get items from a listbox

allows a class to set its properties

returns the hidden enumerator
Answer51

The Get accessor method _______.

Correct Answer:
retrieves the current value of a property
Question 52

The statements inside of a Do/Loop may never be executed if _______.

the terminating condition is at the top of the loop and it is True the first time it is tested

the terminating condition is at the bottom of the loop and it is True the first time it is tested

Both s A and B would cause the statements in the loop not to be executed

The statements in the loop will always be executed
Answer52
The statements inside of a Do/Loop may never be executed if _______.

Correct Answer:
the terminating condition is at the top of the loop and it is True the first time it is tested
Question 53

Items can be added to a list during design time using the _________ collection.

AddLists
Items
ItemsAdd
AddItems
Answer53

Items can be added to a list during design time using the _________ collection.


Correct Answer:
Items
Question 54


The SelectedIndex property can be used to select an item in the list or to determine which item is selected.
True
False
Answer54

The SelectedIndex property can be used to select an item in the list or to determine which item is selected.


Correct Answer: True
Question 55

Inheritance is the ability to create a new class from an existing class.
True
False
Answer55

Inheritance is the ability to create a new class from an existing class.


Correct Answer: True
Question 56


A loop that begins with Do Until will test the condition at the top of the loop.
True
False
Answer56

A loop that begins with Do Until will test the condition at the top of the loop.

Correct Answer: True
Question 57

Declare an array and specify the number of elements using _______.

the ListCount property

the ListIndex property

an Array statement

a Dim statement
Answer57




Declare an array and specify the number of elements using _______.


Correct Answer:
a Dim statement
Question 58

When you add a class module to a project, any form in the same project will automatically recognize the class properties, methods, and events.
True
False
Answer58

When you add a class module to a project, any form in the same project will automatically recognize the class properties, methods, and events.

Correct Answer: False
Question 59

The methods and events of the _________ component can be used to set up output for the printer.

Printer
PrintDocument
Print
PrintAndPreview
Answer59

The methods and events of the _________ component can be used to set up output for the printer.

Correct Answer:
PrintDocument
Question 60

Which of the following is not a style for combo boxes?

Simple
DropDown
DropDownList
SimpleList
Answer60

Which of the following is not a style for combo boxes?


Correct Answer:
SimpleList
Question 61
Property procedures are _______ by default.
Local
Module-level
Private
Public
Answer61

Property procedures are _______ by default.

Correct Answer:
Public
Question 62


An array is a set of variables. Each individual variable is called _______.

a subscript
an element
a subscripted variable
an index
Answer62

An array is a set of variables. Each individual variable is called _______.

Correct Answer:
an element
Question 63
The destructor method automatically occurs _______.

when an object goes out of scope

when an object is destroyed

when an object is created

A and B are correct
Answer63

The destructor method automatically occurs _______.


Correct Answer:
A and B are correct
Question 64

If a program does not include exception handling, what will happen when a data file is opened with the StreamReader object and the file does not exist?

A file will be created

The next available file on the disk will be opened

A dialog box will automatically appear allowing the user to find the correct name or location of the file

An exception will occur
Answer64

If a program does not include exception handling, what will happen when a data file is opened with the StreamReader object and the file does not exist?

Correct Answer:
An exception will occur
Question 65

Use the Select method of a text box in order to select the text in the text box.
True
False
Answer65

Use the Select method of a text box in order to select the text in the text box.


Correct Answer: False
Question 66

A constructor that requires arguments is called _______.

a Public constructor

a destructor constructor

a Sub New constructor

a parameterized constructor
Answer66

A constructor that requires arguments is called _______.


Correct Answer:
a parameterized constructor
Question 67

A _______ is a temporary set of data stored in the memory of the computer.

record source
dataset
connector
table adapter
Answer67

A _______ is a temporary set of data stored in the memory of the computer.

Correct Answer:
dataset
Question 68

In a multitier application, which tier contains the user interface?

the Presentation tier
the Business tier
the Data tier
the Class tier
Answer68

In a multitier application, which tier contains the user interface?

Correct Answer:
the Presentation tier
Question 69

Which of the following instructions will add the word, monkey, to a list box named animalsListBox?

animalsListBox.Insert(monkey)
animalsListBox.Insert ("monkey")
animalsListBox.Items.Add(monkey)
animalsListBox.Items.Add("monkey")
Answer69

Which of the following instructions will add the word, monkey, to a list box named animalsListBox?


Correct Answer:
animalsListBox.Items.Add("monkey")
The Method used to assign a value to property?
Set Accessor Method
Which of the following is Proper Procedure for Setting the Set Accessor Method?

A.
Set (ByVal value as String)
LastNameString = Value
End Set
B.
Set (ByVal value as DataType)
LastNameString = Value
or ClassValue = vadlidation
End Set
C.
Get (ByVal value as String)
LastNameString = Value
End Get

D.
Set (Value as String)
LastNameString = Value
End
Which of the following is Proper Procedure for Setting the Set Accessor Method?

A.
Set (ByVal value as String)
LastNameString = Value
End Set
A group of related fields; relates to data files and database tables.
Record
A _______ in a database table represents a field.
Column
A series of varibles; each individual element can be referenced
Array
An Array is also called a list?
A. True
B. False
An Array is also called a list?
A. True
Selected Index property is set to 1 if no list item is selected?
A. True
B. False
Selected Index property is set to 1 if no list item is selected?

B. False - it is set to -1
The Ability to create a new class based on an existing class?
A. Reusability
B. Inheritance
C. Ecapsulation
D. Polymorphism
The Ability to create a new class based on an existing class?

B. Inheritance
Code Modules that can be used in multiple projects?

A. Reusability
B. Inheritance
C. Ecapsulation
D. Polymorphism
Code Modules that can be used in multiple projects?

A. Reusability
One big advantageof ADO.net is that information is stored and transferred in Extensible Markup language (XML).

A. True
B. False
One big advantageof ADO.net is that information is stored and transferred in Extensible Markup language (XML).

A. True
Use to repeat the statements in a loop a specific number of times.
For/Next Loop
In order to send a line of text to the graphics page, one would use the _______ .

A. Print Method
B. DrawSting Method
C. Printpage Method
D. Write Method
In order to send a line of text to the graphics page, one would use the _______

B. DrawSting Method
To initaite printing output, you excute the _________of the print document component.

A. Print Method
B. DrawSting Method
C. Printpage Method
D. Write Method
To initaite printing output, you excute the _________of the print document component.

A. Print Method
In a multitier application which tier contains the Data Retrival?

A. the presentation tier
B. the business tier
C. the Data tier
D. the Class tier
In a multitier application which tier contains the Data Retrival?

C. the Data tier
In a multitier application which tier contains the business objects such as the Caluclation Business logic and Business rules ?

A. the presentation tier
B. the business tier
C. the Data tier
D. the Class tier
In a multitier application which tier contains the business objects such as the Caluclation Business logic and Business rules ?

B. the business tier
Which text box event occurs when the user types text into the text box portion of a combo box?

A. Click event
B. Enter event
C. Leave event
D. TextChange event
Which text box event occurs when the user types text into the text box portion of a combo box?

D. TextChange event
Which text box event occurs when the text box loses the focus ?

A. Click event
B. Enter event
C. Leave event
D. TextChange event
Which text box event occurs when the text box loses the focus ?
C. Leave event
In order to check the end of the file one would use the StreamReader's Peek method.

A. True
B. False
In order to for the end of the file one would use the StreamReader's Peek method.

A. True
The _________ reads the next data element in a data file.

A. Peek Method
B. Readline Method
C. Close Method
D. Writeline Method
The _________ reads the next data element in a data file.

B. Readline Method
A method that executes automatically when an object is instantiated.

A. overloader
B. constructor
C. destructor
D. objector
A method that executes automatically when an object is instantiated.

B. constructor
Index of the item currently selected in a list box or combo box.
Index of the item currently selected in a list box or combo box.

Selet Index property
A control that holds a list of values; the user cannot add new values at run time.

A. Listcount Control
B. ListBox Control
C. ListIndex Control
D. ListMenu Control
A control that holds a list of values; the user cannot add new values at run time.

B. ListBox Control
An example of using a Boolean Varible is when you to hide a value in list of values.

A. True
B. False
An example of using a Boolean Varible is when you to hide a value in list of values.

B. False
An exmple of using a Boolean variable is when you want to search through a list of for a specific value.

A. True
B. False
An exmple of using a Boolean variable is when you want to search through a list of for a specific value.

A. True
Based upon this code where are testing the condition?

Do
' Statement in loop.

Loop {While I Until } Condition


A. at the top of the loop
B at the botton of the loop
C. We are not testing it all
D. Both A. and B.
Based upon this code where are testing the condition?

Do
' Statement in loop.

Loop {While I Until } Condition

B at the botton of the loop
To make a form into a parent, simply change its IsMdiContainer property to True.

A. True
B. False
To make a form into a parent, simply change its IsMdiContainer property to True.

A. True
Using __________ each forms acts independently of the other forms.

A. MDI's
B. ToolStrips
C. SDI's
D. OOP's
Using __________ each forms acts independently of the other forms.

C. SDI's
The ______________ holds the system date and time in a numeric format that can be used for calculations.

A. Date property
B. Time property
C. Now property
D. Current property
The ______________ holds the system date and time in a numeric format that can be used for calculations.

C. Now property
Each individual varible is called a __________of the array.

A. member
B. element
C. unit
D. type
Each individual varible is called a __________of the array.

B. element
The code :

Dim Category (12) As String

A. will create 13 elements with subscripts 0 thru 12
B. will create 12 elements with subscripts 1 thru 12
C. will create 13 elements with subscripts 0 thru 13
D. will create 12 elements with subscripts 0 thru 12
The code :

Dim Category (12) As String

A. will create 13 elements with subscripts 0 thru 12
New items generally go at the end of the list. However you can alter the placement by setting the control's ____________ to True


A. place property
B. sorted property
C. items property
D. list property
New items generally go at the end of the list. However you can alter the placement by setting the control's ____________ to True

B. sorted property
What will this code do?

CoffeeTypeListBox.SelectedIndex = - 1

A. Select All items in list
B. Deselect the first item in the list
C. Select the first item in the list
D. Deselect all items in the list
What will this code do?

CoffeeTypeListBox.SelectedIndex = - 1

D. Deselect all items in the list