Create-O-Problem (30m)

Along with a partner, create a problem that requires the programmer to do the following:

1. Define a structure.

2. Write a function that checks one or more values within that structure.

3. Write a function that consumes a structure, makes a decision based on its contents, and (potentially) creates a new structure with a new value in one or more of the fields. (For example, imagine an "absolute value" function that consumed posn structures: it would have to return a new posn that had only positive values.)

It is assumed that the person solving your problem will follow the design recipe.

Reply to the Piazza note Create-O-Question (Sept 13) and post your question there.

Creative Commons License This work is licensed under a Creative Commons BY-SA 3.0 License.