Computer Programming Chapter 7-8

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is desk-checking?

The process of manually walking through your code, using sample data; also called hand-tracing.

Independent Sub procedures are helpful to:

They are helpful because they can be invoked from one or more places in an application and they are not associated with an event.

How would you add an item to a Combo Box?

To add an item to a combo box you use ComboBox.Item.Add(" ")

How do you invoke a function?

To invoke a function you include its name with any arguments in a statement

what is an example of a nested loop?

minute hand moves 1 position and the second hand moves 60 positions.

What is a nested loop and can it be a posttest or pretest loop?

nested loop is a repetition structure inside of another repetition structure. can use pretest or posttest loops for outer loop and for inner (nested) loop

What is a combo box and what other object is it like?

A combo box is a control that allows the user to select from a list of choices and also has a text field that may or may not be editable. A combo box is like a list box?

What is a counter variable? What is it used for?

A counter variable is used to keep track of the number of times the loop has been processed. used for startvalue, endvalue, & stepvalue

A function can return how many values?

A function can return 0 to infinite values, but you have to call specific values

What is a procedure?

A procedure is a block of program code that performs a specific task Two types of procedure: Function procedure: returns a value after performing its task Sub procedure: does not return a value

Give an example of what a sub procedure look like and how you would call it.

A sub procedure would be a procedure but it's within its own method.

When you call a statement, how do you need to call the variables?

you must pass the same number, type, and order of parameter values as those declared in the procedure

Explain the difference between ByVal and ByRef.

ByVal: (by value) the procedure receives only the value and cannot change the actual variables value ByRef: (by reference) the procedure receives the address and can make changes to the variable's value.

Explain how Do...Loops are different from For...Next statements.

Do...Loops are different because you must declare and initialize the counter variable, update the counter variable, and include an appropriate comparison in the do clause.

Describe function procedures

Function procedures: A procedure that is not associated with any specific object or event and is processed only when invoked (called) from the code.

When you use ByVal, can you change the value of the actual variable?

No, you cannot change the value of the actual variable

What is a parameter? Where are they declared?

Parameters are the memory locations listed in a procedure header Declared in the procedure header

Describe For...Next statements. What kind of loop is it?

Processes a set of instructions a known number of times. pretest loop Used to code a specific type of pretest loop, called a counter-controlled loop.

Describe Sub-procedures

Sub-Procedures: A procedure that does not return a value after performing its assigned task two types of sub procedure: Event Procedure: associated with a specific object and event Independent sub procedure: collection of code that can be invoked from one or more places in an application

What property is shown on a timer when its true?

The enabled property must be true for the timer to run


Kaugnay na mga set ng pag-aaral

Mastering Biology Chapter 2 Practice Test

View Set

Chapter 67: Management of Patients With Cerebrovascular Disorders

View Set

Karch's PrepU (Pharm) CH. 19 Intro to Nerves and the Nervous System

View Set

Chapter 46: Management of Patients With Gastric and Duodenal Disorders 1

View Set

Ch 1 - Mental health & Mental illness

View Set

Ch. 8 (Receivables, Bad Debt Expense, and Interest Revenue

View Set

Principles of Entrepreneurship Quiz 2

View Set