Jeopardy Questions/Answers

Section: AE & AF

 

  1. In order to set a background color for a command button, what else must first be initialized?

The style must be set to graphical

  1. This specifies the value of iteration variable before iteration begins.

What is initialization?

  1. A quantity that changes as the iteration progresses and which is tested in the continuation condition.

What is iteration variable?

  1. What would the first line of the click event handler look like for a command button named ‘cmd Button’?

Private Sub cmdButton_click( )

  1. What is the abbreviation for the command button?

Cmd

  1. What is the program that responds after a button is clicked?

Event Handlers

  1. It is used to invoke procedures and sometimes pass data into the procedure.

What is the call statement for.

  1. This explains how the actual parameters are assigned to the input formal parameters, the body is executed as if the definition were substituted at the call site, and the actual parameters are assigned the values of the output formal parameters after execution of the body is completed.

What is the Substitution Rule

  1. Name three of the five properties of Algorithms.

a)      input specification

b)      output specification

c)      definiteness

d)      effectiveness

e)      finiteness

  1. What three properties do all variables have?

a)      name

b)      a means to store a (new) value in the variable

c)      a means to get the value stored in the variable

  1. What are collections?

Data structures

  1. What are they used for?

Consist of two things – key to access another piece of information

  1. What are ways information can be sent over the internet?

By email, web pages, and phone calls

  1. What are the potential places that one would find the best information?

At a library or in a specialized databases

  1. Logical, relational, binary, and unary operators are considered what?

Expressions

  1. To call on a procedure we must:

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

  1. Waking up every morning, washing dishes, and trying on clothes are real world examples of repeating a sequence of instructions, better known as this.

What is reiteration?

  1. If parenthesis specify otherwise, this evaluation goes from left to right.

What is natural order?

  1. True or False

Substitution Rule describes how procedure calls work but doesn’t really substitute.

(True)

  1. An indexed name is called a(n)______?

Array

  1. What defines how procedures work?

The substitute rule

  1. When, where, and what values, a procedure call declaration specifies only now.

What is a procedure call?

  1. What are the 4 parts of a procedure?

a)      name

b)      definition

c)      parameters

d)      declaration

 

  1. What is this loop going to print?

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

  1. Precise directions which are given to produce a defined output can be defined as what?

Algorithm

  1. What are Integers, Strings, and Doubles?

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

  1. What is iteration and why is it useful in programming?

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.

  1. What is the difference between formal parameters and actual parameter?

The formal is a variable, the actual is the real number.

  1. When do you use the DoWhile statement?

When doing a loop.

  1. Name the conditional whose purpose is to optionally perform one of two statement sequences.

What is the If-Then-Else conditional.

  1. These are the three components of a procedure.

What are name, formal parameters, and a body/definition.

  1. Built out of variable and operators, they are the means of performing actual computation in programming.

What are expressions?

  1. What are the 2 major components of an iteration?  Define.

Loop body: the steps to be repeated

Stop condition:  a way to exit the loop

  1. What does the Do While general form look like?

Do While <T/F expression>

            <iteration statement list>

Loop

  1. What would this conditional print if a = 3 and b = 5?

If a <>b Then

            Print “8”

Else

            Print “2”

End If

 

Answer:  8

  1. It has the following general form:

Do While <T/F expressions>

<Iteration statement list>

Loop

What is the Do While Loop

  1. This type of string includes decimal numbers or floating point numbers.

What are doubles?

  1. These are the 5 basic operations all databases tables are capable of as described in Ch.20 of the FIT text.

What are Select, Project, Union, Difference, Product

  1. A short-hand notation implemented be database users in order to visualize relationships using an arrow placed between 2 boxes which represent separate entities.

What is an Entity-Relationship Diagram

  1. What makes the Beta Sweep exhaustive?

It considers al CDs from the first to (but not including) the last.

  1. Specify the type of a variable’s values.

What is a declaration?

  1. What do values refer to?

Values refer to the information stored in the variable (location in memory).

  1. This captures the idea that a procedure does.

What is encapsulation?

  1. What are the 3 parts in a procedure in VB programming?

a)      Procedure name

b)      formal parameters

c)      procecdure body

  1. When programming a telegram, what two things need to be done so the wording in the telegram box goes down to the next line?

Scroll bar needs to be vertical and the multiline needs to be on true.

  1. In programming, it is the coded steps to accomplishing a task performed in a thorough and predictable manner each time it is needed.

What is a procedure?

  1. What are the two key components to iteration?

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.

  1. Do While and For Next commands help facilitate this common programming phenomenon.

What is iteration?

  1. It divides something in smaller tasks that can be solved separately and recombine to produce an overall solution.

What is the decomposition principle?

  1. How is the meaning of the sign “=” different in terms of programming and algebra?

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. 

  1. These are written instructions that are executed when specific events are triggered. 

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?”