Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
103 Cards in this Set
- Front
- Back
Statements that are executed in sequence, without branching in another direction.
|
Sequence Structure
|
|
Boolean variable that signals when some condition exists in the program.
|
Flag
|
|
Effect:
Combines two expressions into one. Both expressions must be true for the overall expression to be true. |
Operator:
And |
|
Effect:
Combines two expressions into one. One or both expressions must be true for the overall expression to be true. It is only necessary for one to be true, and it does not matter which. |
Operator:
Or |
|
Effect:
Combines two expressions into one. One expression (not both) must be true for the overall expression to be true. If both expressions are true, or both expressions are false, the overall expression is false. |
Operator:
Xor |
|
Effect:
Reverses the logical value of an expression: makes a true expression false and a false expression true. |
Operator:
Not |
|
Which relational operator means ‘not equal to’ in Visual Basic?
> < <> != |
<>
|
|
Which is not a syntax rule for If…Then statements?
The words If and Then must appear on the same line. Nothing other than a comment can appear after the Then keyword in an If …Then statement. The End If statement must be on a line by itself. Semi - colons need to be used after every statement with in the If…Then structure |
Semi - colons need to be used after every statement with in the If…Then structure
|
|
A Boolean variable that signals whether a condition exists in a program is called a
relational operator arithmetic operator constant value flag |
flag
|
|
Which of the following statements are true about If…Then…ElseIf statements:
i. If…Then…ElseIf statements evaluate the conditions until one is found to be true, executes the statements under the true condition, and then leaves the structure. ii. If…Then…ElseIf statements are like a chain of If statements. iii. If…Then ElseIf statements evaluate all statements in the structure once a true condition is found, and do not leave the structure until a break statement is encountered. iv. An Else statement placed at the end of an If…Then…ElseIf statement ensures that a default action is always executed if none of the proceeding statement conditions in the If…Then…ElseIf structure were met. i only all but i all but iii only i and ii |
all but iii
|
|
The structure: If (condition I And condition II) Then is only true:
if neither condition I or condition II are true if both condition I and condition II are true if either condition I or condition II is true is never true. |
if both condition I and condition II are true
|
|
An If statement placed within the condition of another If statement is known as:
a Nested If statement a composite If statement an If…Then…Else statement an Irrational If statement |
a Nested If statement
|
|
This operator reverses the truth value of an expression; making a true expression false and a false expression true.
Not And Xor Or |
Not
|
|
Which string property or function returns the length of a string variable stored in strVar?
i. strVar.Length ii. strVar.Len. iii. Length(strVar). iv. strVar.Trim all but iii only i and ii all but i i only |
i only
|
|
9. Which is the conversion for the following If...Then...ElseIf statement to a Select...Case statement?
If intValue > 0 And intValue <= 9 Then discount = .10 Else If intValue >9 And intValue <=20 discount = .15 Else discount = .20 Select intValue Case intValue 1 To 9 discount = .10 Case intValue 10 To 20 discount = .15 Case Else discount = .20 End Select Select Case intValue Case Is 1 To 9 discount = .10 Case Is 10 To 19 discount = .15 Case Else discount = .20 End Select Select Case intValue Case 1 To 9 discount = .10 Case 10 To 20 discount = .15 Case Else discount = .20 End Select Select Case intValue Case 1 To 9 discount = .10 Case 10 To 19 discount = .15 Case Else discount = .20 End Select Select Case intValue Case intValue 1 To 9 discount = .10 Case intValue 10 To 19 discount = .15 Case Else discount = .20 End Select |
Select Case intValue
Case 1 To 9 discount = .10 Case 10 To 19 discount = .15 Case Else discount = .20 End Select |
|
Which are characteristics of a CheckBox control?
i. only one check box can be selected at a time. ii. you can use code to select or deselect a check box by using an assignment statement and the Checked property. iii. a CheckChanged event is triggered whenever the user changes the state of a check box. iv. a check box’s Checked property can only be set with an assignment statement during run time. ii and iii only only i and iv all but i all but iv |
ii and iii only
|
|
A _________ control is used to gather input without placing a text box on a form.
Check Box Variable Message Box Input Box List Box |
Input Box
|
|
What buttons appear on an Input Box automatically?
OK , Help, and Cancel OK and Cancel OK and Abort OK and Help |
OK and Cancel
|
|
A _________ control displays a list of items and allows the user to select one or more items from the list.
Check Box List Box Input Box Message Box |
List Box
|
|
The ___________ property determines the number of items stored in a list box.
.Items.Index .Items.Number .Items.Count .Count.Items |
.Items.Count
|
|
To add values to a List Box during run time use the following method:
ListBox:Items.Add(Items) ListBox.Items.Insert(Item) ListBox. Item.Add(Item) ListBox. Items.Add(Item) ListBox. Items.Add.Item |
ListBox. Items.Add(Item)
|
|
What statement marks the end of a Do While loop?
Loop End Loop End Do While End |
Loop
|
|
A loop that does not have a way of stopping is called a ______________.
Infinite loop Pre test loop Post test loop Test loop Random loop |
Infinite loop
|
|
The general form:
Do statement 1 statement 2 statement 3 Loop Until expression is an example of a ____________ loop. pretest conditional posttest incremental |
posttest
|
|
A ____________ loop uses a counter variable to perform the loop a specific number of times.
Do While If … Then Do Until For … Next |
For … Next
|
|
A loop inside another loop is called a _________ loop.
posttest conditional pretest nested |
nested
|
|
Which are characteristics of both a List Box and a Combo Box?
i. Both display a list of items to the user. ii. Both have Items.Add, Items.Clear, Items.Remove and Items.RemoveAt methods. iii. Both have Items, Itmes.Count, Sorted, and SelectedItems properties iv. Both have a rectangular area that functions like a text box. only ii and iii all but iv all but i all are true |
all but iv
|
|
Which characteristics of ToolTips are true?
i. It is a small box that is displayed when the user holds the mouse cursor over a control. ii. The ToolTip control is invisible at runtime. iii. The ToolTip control appears in the component tray at run time. iv. The InitialDelay property measures the amount of time in milliseconds that a ToolTip remains on the screen once it is displayed by the user. i and iii only i and iv only i, ii and iii only All are true i and ii only |
i and ii only
|
|
______________ is the process of inspecting information given to the application by a user, and making sure that it is valid.
Inspection Validation Syntax Validation User Validation Input Validation |
Input Validation
|
|
Which statement is not true about general purpose procedures?
Procedures reduce redundancy in an applications code. A general purpose procedure is associated with a control. A procedures modularize an applications code. An Event Handle or and Event Procedure is a type of procedure executed during runtime. |
A general purpose procedure is associated with a control.
|
|
If you leave out the AccessSpecifier part of the Procedure declaration, it defaults to:
Global Private Protected Public |
Public
|
|
A special variable that receives a value being passed to a procedure is called a _____________.
Procedure Variable Argument Specifier Parameter |
Parameter
|
|
Which statement is not true about static variables?
A static variable retains its stored value for the lifetime of the application Static variables are destroyed when the procedure terminates. Only variables declared within procedures may be static. In order to declare a static variable, replace Dim with Static The static variable scope is only the procedure in which they were declared. |
Static variables are destroyed when the procedure terminates.
|
|
Values passed to procedures are called _______________.
Sub Variables Arguments Parameters Specifiers |
Arguments
|
|
What is the difference between passing an argument by value or by reference?
Passing by reference creates a new memory location used in the procedure to hold the value passed so the value can not be altered by the procedure; while passing by value accesses the same memory location as the passed value, thus having the ability to alter the original value. Passing by value creates a new memory location used in the procedure to hold the value passed so the value can not be altered by the procedure; while passing by reference accesses the same memory location as the passed value, thus having the ability to alter the original value. ByVal replaces Dim when declaring a parameter to passed by reference. Passing by value is more stable than passing by reference. |
Passing by value creates a new memory location used in the procedure to hold the value passed so the value can not be altered by the procedure; while passing by reference accesses the same memory location as the passed value, thus having the ability to alter the original value.
|
|
To pass a parameter by reference, use the _________ keyword to in the declaration of the parameters variables.
ByVal Dim ReDim ByRef |
ByRef
|
|
A _____________ returns a value to the part of the program that called it.
Procedure Function Declaration Variable Call |
Function
|
|
In debugging a program you would use the ___________ command to go through a function or procedure one line at a time.
Step Over Step Into Step Out Debug |
Step Into
|
|
What happens after a function or a procedure is finished executing?
The application program terminates. The application program waits for a user’s to initiate the next event. The application program returns back to the original place where the function or procedure was called, and resumes executing the code at the next line. The application program returns back to the original place where the function or procedure was called, and then waits for the user to initiate the next event. |
The application program returns back to the original place where the function or procedure was called, and resumes executing the code at the next line.
|
|
A ___ statement, when equal to True, can permit one or more other statements to execute
|
Conditional
|
|
Relational expressions can only be evaluated as ___ or ___.
|
True, false
|
|
A non-Boolen variable or expression is considered ___ if its value is 0. If its value is anything other than 0, it is considered ___.
|
False, true
|
|
The _____ statement is like a chain of If...Then...Else statements. They perform their tests, one after the other, until one of them is found to be true.
|
If…Then…ElseIf
|
|
_____ operators connect two or more relational expressions into one or reverse the logic of an expression.
|
Logical
|
|
The _____ returns a lowercase version of a string.
|
ToLower
|
|
The _____ method returns the number of characters in a string.
|
Length
|
|
The _____ method returns a copy of a string without trailing spaces.
|
TrimEnd
|
|
The _____ method extracts a specified number of characters from within a specified position in a string.
|
Substring
|
|
The value _____ can be concatenated with a string to produce multiple line displays.
|
ControlChars.CrLf
|
|
_____ is the process of inspecting input values and determining whether they are valid.
|
Input validation
|
|
_____ may appear alone or in groups and allow the user to make yes/no, or on/off selections.
|
Check boxes
|
|
It is not possible to write an expression that contains more than one logical operators.
|
False
|
|
You may use the relational operators to compare strings.
|
True
|
|
Radio buttons that are placed inside a group box are treated as one group, separate and distinct from any other groups of radio buttons.
|
True
|
|
You may have one or more check boxes on a form, and any number of them can be selected at any given time.
|
True
|
|
The Dim statement for a class-level variable appears inside a procedure.
|
False
|
|
Relational operators allow you to _____ numbers.
a. Add b. Multiply c. Compare d. Average |
c. Compare
|
|
This is a variable, usually a Boolean, that signals when a condition exists.
a. Relational operator b. Flag c. Arithmetic operator d. Float |
b. Flag
|
|
When placed at the end of an If...The...ElseIf statement, this provides default action when none of the ElseIf statements have true expressions.
a. Trailing If b. Trailing Select c. Trailing Otherwise d. Trailing Else |
d. Trailing Else
|
|
This operator connects two expressions into one. One or both expressions must be true for the overall expression to be true. It is only necessary for one to be true, and it does not matter which.
a. And b. Or c. Xor d. Not |
b. Or
|
|
This operator reverses the logical value of an expression. It makes a true expression false and true expression true.
a. And b. Or c. Xor d. Not |
d. Not
|
|
When determining whether a number is inside a numeric range, it's best to use this logical operator.
a. And b. Or c. Xor d. Not |
a. And
|
|
In code you should test this property of a radio button or a check box to determine whether it is selected.
a. Selected b. Checked c. On d. Toggle |
b. Checked
|
|
str is a string variable. This statement returns the length of the string stored in str.
a. Length(str) b. str.Length c. str.StringSize d. CharCount(str) |
b. str.Length
|
|
A(n) _____ provides a simple way to gather input without placing a text box on a form.
|
Input box
|
|
A _____ causes one or more statements to repeat.
|
Loop, or repetition structure
|
|
A _____ is a variable that is regularly incremented or decremented each time a loop iterates.
|
Counter
|
|
Each repetition of the loop is called a(n)
|
Iteration
|
|
A loop that is inside another loop is called a _____ loop.
|
Nested
|
|
The _____ occurs after the Validating event, when the input focus shifts to another control.
|
Validated
|
|
The _____ function returns the periodic payment amount for a loan.
|
Pmt
|
|
The _____ function returns the required interest payment for a specific period on a loan.
|
IPmt
|
|
You display input boxes with this function.
a. InBox b. Input c. InputBox d. GetInput |
c. InputBox
|
|
Visual Basic automatically adds this to a list box when it contains more items than can be displayed.
a. Larger list box b. Scroll bar c. Second form d. Message box |
b. Scroll bar
|
|
The property holds the index of the selected item in a list box.
a.Index b. SelectedItem c. SelectedIndex d. Items.SelectedIndex |
c. SelectedIndex
|
|
The Do While statement marks the beginning of a Do While loop, and the Loop statement marks the end. The statements between these are known as one of the following.
a Process of the loop b. Functions of the loop c. Substance of the loop d. Body of the loop |
d. Body of the loop
|
|
One of the following is a sum of numbers that accumulates with each iteration of a loop.
a. Counter b. Running total c. Summation function d. Iteration count |
b. Running total
|
|
You do this to get the total number of iterations of a nested loop.
a. Add the number of iterations of all the loops b. Multiply the number of iterations of all the loops c. Average the number of iterations of all the loops d. Get the number of iterations of the outermost loop |
b. Multiply the number of iterations of all the loops
|
|
This control has a rectangular area that functions like a text box.
a. List box b. Drop-down list box c. Combo box d. Input label |
c. Combo box
|
|
With this style of combo box, the list of items does not drop down, but is always displayed.
a. Drop-down combo box b. Simple combo box c. Drop-down list combo box d. Simple drop-down combo list box |
b. Simple combo box
|
|
A control's _____ property can be set to True or False. If it is set to True, the _____ event of the control that focus is shifting from will fire.
a. Validating, Causes Validation b. CausesValidation, Validating c. Validated, Perform Validation d. Perform Validation, Validating |
b. CausesValidation, Validating
|
|
The statements inside this may perform several operations on the same object with out specifying the name of the object each time.
a. Validating procedure b. Control container c. Invisible control box d. Invisible property |
b. Control container
|
|
If you do not provide a value for an input box's title, an error will occur.
|
False
|
|
The Items.RemoveAt method always removes the last item in a list box
(the item with the highest index value) |
False
|
|
A loop's conditionally executed statements should be indented.
|
True
|
|
The Do While loop may be written as either a pretest or posttest loop.
|
True
|
|
The Step Increment part of the For...Next statement is optional.
|
True
|
|
In a nested loop, the inner loop goes through all of its iterations for each iteration of an outer loop.
|
True
|
|
A drop-down list combo box allows the user to either select an item from a list or type text into a text input area.
|
False
|
|
The Validated event is triggered before the Validating event.
|
False
|
|
A(n) _____ is a named block of code that performs a specific task and does not return a value.
|
procedure
|
|
A(n) _____ is a named block of statements that executes and returns a value.
|
Function
|
|
_____ local variables are not destroyed when a procedure returns a vlaue.
|
Static
|
|
A(n) _____ is a special variable that receives an argument passed to a procedure or function.
|
Parameter
|
|
When an argument is passed by _____ the procedure has access to the original argument.
|
Reference
|
|
Which of the following terms means to divide an application's code into small, manageable procedures?
a. Break b. Modularize c. Parameterize d. Bind |
b. Modularize
|
|
What happens when a procedure finishes executing?
a. The application branches back to the procedure call, and resumes executing at the next line b. The application terminates c. The application waits for the user to trigger the next event d. The application enters Break mode |
a. The application branches back to the procedure call, and resumes executing at the next line
|
|
What type of local variable retains its value between calls to the procedure or function in which it is declared?
a.Private b. Persistent c. Permanent d. Static |
d. Static
|
|
What keyword is used in a parameter declaration to specify that the argument is passed by value.
a. ByVal b. Val c. Value d. AsValue |
a. ByVal
|
|
Which of the following is a debugging command that causes a procedure or function to execute without single-stepping through the procedure's or function's code?
a. Step Into b. Step Through c. Jump Over d. Step Over |
d. Step Over
|
|
A general purpose procedure is associated with a specific control.
|
False
|
|
The declaration of a parameter variable looks like a regular variable declaration, except ByVal or ByRef is used instead of Dim
|
True
|
|
If you write a procedure or function with a parameter variable, you do not have to supply an argument when calling the procedure.
|
False
|