MMET 383 TEST 2 QUESTIONS & ANSWERS
1. Why modularize?- Answer - - Eliminate duplicate code
-Improve understandability
-Facilitate reusability
2. How do you write a procedure?- Answer - Private
sub example() txtname.text = ""
txtgo
al.text
= ""
End
Sub
3. What is the rule of thumb for procedure length?- Answer - The procedure length should not
be larger
than one screen
4. What is a procedure?- Answer - any sequence of statements that has a name is executed in a unit
5. What is a sub procedure?- Answer - Both event procedures and the general procedures that you write
6. What is a property procedure?- Answer - Used when developing your own objects
7. What are the three types of procedures?- Answer - -Sub Procedures
-Function Procedures
-Property Procedures
8. What are the two procedures that fall under sub procedures?- Answer - -Event
Procedures
-General Procedures
9. How do you call a procedure that does not have any arguments?- Answer -
1/5
, Use the call function
EX- Answer - Call example()
10. How do you call a procedure that has arguments?- Answer - name argument1,
argument2,..., argumentLast
or
Call name(Argument1, Argument2,...,ArgumentLast)
11. What does a function do?- Answer - A function executes code that performs a special task
12. When is a function implicitly called?- Answer - A function is implicitly called when an
expression that contains the name of the function is evaluated
13. Where does execution resume after a function has been called?- Answer -
Execution resumes at the point just after the function was called
2/5
1. Why modularize?- Answer - - Eliminate duplicate code
-Improve understandability
-Facilitate reusability
2. How do you write a procedure?- Answer - Private
sub example() txtname.text = ""
txtgo
al.text
= ""
End
Sub
3. What is the rule of thumb for procedure length?- Answer - The procedure length should not
be larger
than one screen
4. What is a procedure?- Answer - any sequence of statements that has a name is executed in a unit
5. What is a sub procedure?- Answer - Both event procedures and the general procedures that you write
6. What is a property procedure?- Answer - Used when developing your own objects
7. What are the three types of procedures?- Answer - -Sub Procedures
-Function Procedures
-Property Procedures
8. What are the two procedures that fall under sub procedures?- Answer - -Event
Procedures
-General Procedures
9. How do you call a procedure that does not have any arguments?- Answer -
1/5
, Use the call function
EX- Answer - Call example()
10. How do you call a procedure that has arguments?- Answer - name argument1,
argument2,..., argumentLast
or
Call name(Argument1, Argument2,...,ArgumentLast)
11. What does a function do?- Answer - A function executes code that performs a special task
12. When is a function implicitly called?- Answer - A function is implicitly called when an
expression that contains the name of the function is evaluated
13. Where does execution resume after a function has been called?- Answer -
Execution resumes at the point just after the function was called
2/5