Jeopardy Questions/Answers
Section: AE & AF
The style must be set to graphical
What is initialization?
What is iteration variable?
Private Sub cmdButton_click( )
Cmd
Event Handlers
What is the call statement for.
What is the Substitution Rule
a) input specification
b) output specification
c) definiteness
d) effectiveness
e) finiteness
a) name
b) a means to store a (new) value in the variable
c) a means to get the value stored in the variable
Data structures
Consist of two things – key to access another piece of information
By email, web pages, and phone calls
At a library or in a specialized databases
Expressions
a) state name of procedure to be actuated
b) provide values for each of input parameter
c) provide variable names of each of output parameter positions in which to receive answers
What is reiteration?
What is natural order?
Substitution Rule describes how procedure calls work but doesn’t really substitute.
(True)
Array
The substitute rule
What is a procedure call?
a) name
b) definition
c) parameters
d) declaration
i = 0
j = 0
Do While i < 5 or j < -2
i = i +1
j = j – 1
Loop
Answer: nothing…..it’s an infinite loop
Algorithm
These are all values used in Programming.
Integer: whole numbers
Strings: symbol sequences of keyboard characters, always in quotes
Doubles: decimal #, also known as floating point numbers
Iteration is the repeated execution of a series of statements in programming. It is useful because it allows for computers to repeat instructions without the programmer explicitly writing them out each time.
The formal is a variable, the actual is the real number.
When doing a loop.
What is the If-Then-Else conditional.
What are name, formal parameters, and a body/definition.
What are expressions?
Loop body: the steps to be repeated
Stop condition: a way to exit the loop
Do While <T/F expression>
<iteration statement list>
Loop
If a <>b Then
Print “8”
Else
Print “2”
End If
Answer: 8
Do While <T/F expressions>
<Iteration statement list>
Loop
What is the Do While Loop
What are doubles?
What are Select, Project, Union, Difference, Product
What is an Entity-Relationship Diagram
It considers al CDs from the first to (but not including) the last.
What is a declaration?
Values refer to the information stored in the variable (location in memory).
What is encapsulation?
a) Procedure name
b) formal parameters
c) procecdure body
Scroll bar needs to be vertical and the multiline needs to be on true.
What is a procedure?
a) the repetition of a bunch of steps
b) a way to stop the repletion at some point and continue with the rest of the program.
What is iteration?
What is the decomposition principle?
In programming, the “=” is the assignment operator. It means the right hand expression is evaluated the same as the left hand side. In algebra, it means that the two sides of the equation have to be equal.
What are event procedures?
What are 5 important steps in writing a functioning iteration?
-Declare variable
-Initialize
-Specify a test
-Activate test
-Formulate changed variable within loop
What is the purpose of the iteration variable?
It’s the quantity that changes as iteration progresses, tests, and continuation of the condition.
What is a loop good for in computer programming?
Loops are used in several different ways but a popular use is to repeat through a specific set of data until you no longer need that data. In lecture we could have used a loop to search through cards until we found a certain card.
Is programming Algebra? Give at least one example in your explanation.
No, programming is not Algebra. For example the “=” sign in Algebra means equal, but in programming it reads “become” or “gets” something.
A precise, systematic method for deterministically producing a specified result.
What is an algorithm?
What are similarities of an input and output parameter? What differences, if any, do they have?
Both input and output parameter can contain variables but only an input parameter can contain constants or expressions.
Term for a place in memory where a program can store, access, and restore information.
What is a variable?
A variable declared within a private subroutine is called this.
What is a local variable?
List of variables that will be passed to the function.
What is an argument list?
Name the 3 places where function names can be used.
-Naming the function
-Setting the return value
-Calling the function
When double clicking on a button on the form, what pops up in the code?
Click Event Routine
What is the general form for a conditional statement?
If <T/F expression> Then
<code statements>
Else
<code statements>
End If
What 3 properties must all variables have?
-A name
-A means to store a value in the variable
-A means to get or copy the value stored in the variable
What is the general form of an assignment statement?
<variable name> <assignment symbol> <expression>
The code used to repeat a series of executions in a program. Often referred to as loops.
What is an iteration?
The statement used to invoke a procedure.
What is a call statement?
What are the 5 essential properties of an algorithm?
-Input specified
-Output specified
-Definiteness
-Effectiveness
-Finiteness
What is an assignment statement?
The operation that changes the value of any declared variable in a program. The value on the right flows into the variable on the left.
What are actual parameters or arguments?
These are the actual values to be computed on used in calls to procedures. Formal parameters are placeholders for actual parameters.
When working in Adobe Photoshop, if you are to save what you are working on and come back to work on it later, what sort of file type should you save it as?
.psd
What is the O-parameter rule?
Output actual parameters must be variables.
In Visual Basic, what is the difference between caption and name?
Name is the current name of the object. Caption is the text that the object displays.
Identify what is wrong with this code:
Private Sub cat_click
txtcat.caption = “meow”
lblcat.caption = “cat
lbldog.caption = ‘’
frmcat.backcolor = blue
txtcat.text is missing end quotes, single quotation marks, there is supposed to be a vb in front of blue.
When changing the back color of a command button, what else must be changed for the new back color to show?
Style – graphical
Why are operators like “+” and “-” called binary operators?
Because they operate on 2 values (called operands).
Define and give the purpose for variable declaration. Also show the syntax for declaration in code.
Variable declaration:
-lists names of variables used in a program
-asserts what type of values each will be assigned
-variables must be declared
Code:
Option Explicit
Dim x As Integer
Dim y As String
In Visual Basic, the text box is also a property of what?
The text box is also called an edit field or edit control; contains the text that is displayed in the box either at design time or at run time.
Name 5 of the Visual Basic operators in an expression (logical, relational, binary, or unary).
Logical: AND, OR, NOT
Relational: <, >, <=, =>, <>, =
Binary: +, *, &
Unary: -, ^, NOT
The programming term for a process that is repeated for a set requirement of times.
What is a loop?
What does HTML stand for?
Hypertext Markup Language
How does a person programming in Visual Basic keep the variable names created by the user from being confused with the pre-programmed variables?
Visual Basic always capitalizes its variables so the user must start their variables with a lowercase.
What are the 4 features of an iteration?
-Iteration variable
-Initialization
-Continuation test
-Instructions
How does a computer read instructions for a program?
They read them in the order given. The first instructions get done first, the second set second, and so forth, unless specified otherwise.
To interrupt an infinite loop on Windows Operating Systems, one must type this.
What is Ctrl + Shift + Break?
What are the parts of a procedure specification?
-Name
-Definitions
-Parameters
-Declaration
Describe arrays and its properties.
The items of an array are known as elements and has “lower limit” and “upper limit” properties.
What is the following, and what does it do?
Private Sub cmdOK_click()
Text = txtUserInput.text
lblUserOutput.caption = UCase (text)
End Sub
This is a procedure. When the cmdOK is clicked, the information entered in the UserInput box will be converted to uppercase and displayed in the UserOutput label.
Describe iteration and give its 2 key components.
Iteration is the repeated execution of a series of programming statements.
-It must be a repetition of a series of steps
-There must be a way to stop the repetition and a way to continue with the program
A whole number and/or a programming datatype for a whole number (either positive or negative).
What is an integer?
In Visual Basic, what does the term “sub” stand for?
Subroutine
In Visual Basic, what does - Dim x As Integer – define?
It defines x as a variable whose values are integers.
What is the value of a variable?
The information stored in the variable.
In the following procedure, what is input called?
Private Sub_blank
Dim input As Double
End Sub
Input is called the local variable.
What is an example of an iteration construct?
Do-While or For-Next Loop
What does the following print?
Dim x As Integer
x=8
If x>=0 Then
Print “what?”
Else if x>=3 Then
Print “OK”
Else
Print “Mariners”
End If
It prints: “what?”