Functions

CS-150, Fall '02, Learning Objectives


Fundamental Topics

Be able to recognize when the use of a function would be appropriate in a program.

Know the syntax for declaring and defining a function.

Know how to return a value from a function.

Know how to write and use functions that do not return values (sometimes called procedures).

Know how to use parameters with function calls.

Know under what condition parameters must be passed by reference.

Know under what condition parameters should be passed by constant reference.

Be able to write functions that accept parameters as values, by reference and by constant reference.

Be able to explain when global variables and constants should be used.

Be able to declare and define global variables and constants.

Be able to explain how global variables can cause problems in programs.

Know how to represent functions in flow charts and pseudocode.

Advanced Topics

Be able to describe side effects in general and give an example of a side effect.

Know what preconditions are and be able to explain why they are important to document and obey.

Know how to test preconditions with the assert function.

Know what header file must be included in a program to make the assert function available.

Be able to explain what "stubs" are and how to use them during program development.


Send comments and suggestions about these objectives to: Dr. Charles S. Tritt
This page last updated 10/16/02