Chapter 5 Outcomes
Procedures


After completing this chapter and participating in class, you should be able to accomplish each of the following outcomes.

Knowledge Outcomes

  1. Define each of the key terms listed in the chart below.

  2. predefined procedures signature parameters
    data type
    of parameters
    call or invoke formal parameters
    actual parameters procedure body include statement
    fixed parameter variable parameter call by value
    call by reference binary representation representation of a value
    driver programs global variables local identifier
    state of variables pre-condition post-condition
    predicate predicate calculus specification of the program
    blackbox testing whitebox testing  

  3. Explain the layout of the pixel graphics screen including the x and y coordinate system, maxx, maxy, Draw commands (5.1).

  4. Differentiate between using include as a means of accessing a procedure stored in a separate file and the use of a module (and import) as a means of accessing procedures (5.2).

  5. Explain the use of variable parameters in the program "outwds.t" (5.3).

  6. Explain how a variable parameter is passed as a call by reference between the main program and the procedure (5.3).

  7. Differentiate between call by value and call by reference when using procedures (5.3).

  8. Describe the correspondence between the representation of a number and the representation of that number using digits and base system place holders (5.4).

  9. Explain how the procedures strnum, and numstr are able to convert a number from one base system into a decimal number and a decimal number into a different base system (5.4).

  10. Describe the purpose of driver programs when testing your program (5.4).

  11. Discuss why global variables are not considered good programming form but global constants are acceptable (5.5).

  12. Discuss the use of global variables in objects (modules) (5.5).

  13. Describe what is meant by the scope of an identifier (5.6).

  14. State how identifiers are used in each of the following situations (5.6):

  15. State the rules which the scope of identifiers follow in each of the following cases (5.6):

  16. Explain the purpose of pre and post conditions when defining a procedure (5.7).

  17. Explain the difference between blackbox testing and whitebox program testing (5.8).

Skills Outcomes

  1. Provide the correct parameters needed to call a predefined procedure (5.1).

  2. Use the include statement to select a procedure from a disk file to be used in a program (5.2).

  3. Create simple user-defined procedures that pass fixed or variable parameters (5.2 & 5.3).

  4. Manually mimic the execution of a program by using a trace table to determine the state of a program during intermediate stages of its execution (5.9).