Shared Flashcard Set

Details

ITEC1310
VBTest2 chap 5 & 6
24
Computer Science
Undergraduate 3
03/30/2010

Additional Computer Science Flashcards

 


 

Cards

Term
Sub Procedures
Definition

Perform one or more related tasks
General syntax

Sub ProcedureName()

   statements

End Sub

Term

 

Call statement

 

Definition

The statement that invokes a Sub procedure

ProcedureName()

Term
Passing by Value
Definition

When a variable argument is passed to a ByVal parameter, just the value of the argument is passed.
After the Sub procedure terminates, the variable has its original value

Term
Passing by Reference
Definition

When a variable argument is passed to a ByRef parameter, the parameter is given the same memory location as the argument.
After the Sub procedure terminates, the variable has the value of the parameter

Term

Lifetime

Definition
Period during which it remains in memory.
Term

 

Scope

 

Definition

In Sub procedures, defined same as in event procedures.

Suppose a variable is declared in procedure A that calls procedure B. While procedure B executes, the variable is alive, but out of scope.

Term

Function procedures

Definition

aka user-defined functions

always return one value

Term

Stepwise refinement 

Definition

divide-and-conquer approach

also is part of top-down design methodology

Term

Top-down design

Definition
General problems are at the top of the design
Specific tasks are near the end of the design
is a  technique to enhance programmers' productivity
Term
Top-down design criteria
Definition

1.The design should be easily readable and emphasize small module size.
2.Modules proceed from general to specific as you read down the chart.
3.The modules, as much as possible, should be single minded. That is, they should only perform a single well-defined task.
4.Modules should be as independent of each other as possible, and any relationships among modules should be specified.

Term
Sequences
Definition
Statements are executed one after another
Term

Decisions

Definition
One of two blocks of program code is executed based on a test for some condition.
Term

Loops (iteration)

Definition
One or more statements are executed repeatedly as long as a specified condition is true.
Term
Stub testing
Definition
Using a driver program to test modules
Term
Object-Oriented Programming
Definition

an encapsulation of data and code that operates on the data
objects have properties, respond to methods, and raise events

Term

The Do loop 

Definition
repeats a sequence of statements either as long as or until a certain condition is true.
Term

Peek method

Definition
determines if we have reached the end of the file from which we are reading
Term

counter 

Definition
a numeric variable that keeps track of the number of items that have been processed.
Term
accumulator 
Definition
a numeric variable that totals numbers
Term
flag 
Definition
a variable that keeps track of whether a certain situation has occurred
Term

Boolean

Definition
The data type most suited to flags
Term
Nested loops
Definition

Statements inside a loop can contain

another loop.

Term
For...Next loops
Definition

Used when we know how many times we want the loop to execute
A counter controlled loop

Supporting users have an ad free experience!