Class 13 Objectives
KNOW:
- That whenever a computation needs to process every element of a list,
you need a separate function to perform that computation.
- That there are two approaches to designing programs that use helper functions:
- develop the helper first, then complete the function that calls the helper
- develop the calling function first (assuming the helper works as described), then complete the helper function
BE ABLE TO:
- Explain why the code in the
insert
function (from today's
class) could NOT be coded as part of the sort
function. In other
words, explain why insert
HAS to be a separate function.
Sample Exam Question:
Using the data definitions for ListOfCourse and Course that
we developed in class this week, modify the sort/insert functions from today's
class so that they sort a list of courses in ascending order by course number.