Skip to main content

HW 9: Document a design pattern

In class on Monday, you were (or will be) assigned a design pattern.

Describe that design pattern in a form that will be useful for your fellow students. In particular, you should provide examples of how the pattern might be used in relevant programs in Scheme, Java, and Ruby.

Your submission should include:

  • An explanation of the programming problem or situation that the pattern is intended to solve.
  • (Optionally): A description of the typical “bad” solution to the problem.
  • An explanation of the approach the pattern uses to solve the problem (or address the situation).
  • Code in Scheme that illustrates the approach. (If possible.)
  • Code in Java that illustrates the approach.
  • Code in Ruby that illustrates the approach.

While you may use the Interweb as a resource, please do not rely on examples you find on the Interweb. Part of the assignment is for you to generate your own examples.

You may work alone or you may work with other students assigned the same pattern.

Send me your description of the pattern in a message entitled “CSC 321.01 2018S, HW 9: Document a design pattern (Name)”. Please replace Name with your name. .