302 quiz 11/6

Ace your homework & exams now with Quizwiz!

what is the operator used in casting a varaible to a different data type

TryCast

what is the difference between a function and sub procedure

a function procedure returns a value after performing its task, sub procedure does not

what does the e parameter contain

additional info about the object that raised the event

what is a subscript in an array similar to

an index in a list box- identifies each variable in a one-dimensional array, starts at 0

where does the keyword ByVal go

before the parameter

what are the two ways you can passa varaible to a procedure

by value by reference (pass variable's address, whatever that means)

what calls/invokes the independent sub procedure

call statement, naturally --Call procedureName

where is a timer control

component tray

what is each individual variable in the array

element

what are the two types of sub procedures

event procedure independent sub procedure

what procedure is automatically processed when the associated event occurs

event procedure, one of the two types of sub procedures

what are the two types of procedures

function sub

array

group of variables with same name and data type

in a caclulation for gross = hours * rate, which are referenced byVal and which are byRef

hours and rate are ByVal because they are not changed gross is byRef because it references the location

what does an array do for a program

increases the efficiency

what are the two properties of timer control (and event)

interval (length of time til next tick) enabled (has to be true) tick event- occurs after each interval has elapsed

what does the term "method" mean in object oriented programming

method means both sub and function procedures

in an array can you assign values after assigning a single element

no

does an event procedure produce a value

no, it is a type of sub procedure

an event procedure is associated with a specific __ and __

object and event

one dimensional vs. two dimensional array

one dimensional- one thing tracked (ex: stock prices) two dimensional- two things tracked (ex: sales by region and by quarter)

where can an independent sub procedure be invoked?

one or more places in an application (weird bc you think its independent)

what kind of case is used for independent sub procedures

pascal case

what is a block of program code that performs a specific task

procedure

what happens in passing a varaible by reference

procedure receives the address and can make changes to the variables value (can make changes to original variable)

what key word sets the value to be returned by the function

return

what does a function procedure do

returns a value after completing its task

what are the 3 things you must pass when calling a procedure with parameters

same number of arguments same type of arguments arguments in same order as declared in procedure

what contains the memory address of the object that raised the event

sender parameter

difference when converting an object variable

sender parameter is decalred as type "Object"

what do procedures do in a sub procedure

store the information passed into the procedure when it is invoked/called

what does a parameter do

stores data that is passed to the procedure when the procedure is invoked

What are the 3 reasons why independent sub procedures are used

1 eliminate duplication of code in diff parts of a program 2 large complex application --> small manageable tasks 3 allow mutiple programmers to work on app simultaneously

what does the handles keyword do (2)

1 indicates the object and event associated with the procedure 2 controls when the procedure is invoked

what happens in passing variables by value

the receiving procedure creates a copy of the variable (cannot change it

what is an array used for

to temporarily store related data in memory

what is the process of converting a variable of one data type to another

type casting / casting

simple vvariable aka scalar variable

variable that is unrelated to any other variable in memory

can an event procedure be associated with more than one object and event

yes, as long as each event has the same parameters

what is the default method of passing variables

ByVal

what is the process of reviewing the program instructions while seated at your desk instead of in front of a computer

Desk checking or hand tracing

what is pascal case

First letter is capatilized

is an independent sub procedure associated with an event

NO, that is an event procedure-the other type of sub procedure. Independent sup procedure are only process when called (invoked)

what kind of clause does a function procedure have in the header

"As (datatype)" clause

what does an independent sub procedure look like

Private sub procedureName (parameter List) ENd Sub


Related study sets

Year 9 Reading Assessment - A Facebook Chat

View Set

Finance 8 Personal Finance - Ch 8 Home and Automobile Insurance - Focus on Personal Finance - McGraw Hill 5 edition

View Set

Life insurance Chapter one Completing the application, underwriting, and delivering the policy

View Set

Chapter 23- The Evolution of Populations

View Set

SOCI 1302 Reading Smartbook Chapter 3

View Set

Astronomy Ch 9 - The Terrestrial Planets

View Set

chapter 2: collecting subjective data

View Set

Edaptssss - Post Traumatic Stress Disorder/Syndrome

View Set

Texas Principles of Real Estate 2: Mini-Quizzes

View Set

PrepU - Chapter 44: Digestive and Gastrointestinal Treatment Modalities

View Set