On this page:
1 Practice with templates
2 Practice with your instructors
8.14

Extra credit: Nested templates🔗

This assignment is due on Friday, October 18 at 11:59pm.

1 Practice with templates🔗

Review how to write templates for unions. Click the button

Check your answer using “Show answer” above. Did you get it right? If not, click the button again to get another set, and keeping doing it until you get it right without peeking at the answer.

You don’t need to submit anything for this check. But the longer you put off mastering the skill of writing templates, the harder the rest of this entire course will be for you. If you want to do well in the course you have to stay on top of all the material. Don’t leave things to “learn later” because that’ll never work out.

2 Practice with your instructors🔗

Get extra credit worth 1% of your final grade!
  1. Go to Luddy Hall room 0121 during an in-person tutoring session and tell the instructor that you want to take the template quiz.

    You can only try once per tutoring session. You can also try once during each lab session, but only if you and your partner are done with the entire lab, including optional exercises, and the instructor is not busy helping other students.

  2. The instructor will give you a piece of paper with some random data definitions on it, just as produced by the button above. Grab a blank piece of paper and write the templates for functions that process these data.

    To receive credit, your answer must be exactly correct, but it doesn’t matter
    • how you name your function inputs,

    • how you order your function definitions, your cond cases, and your structure fields,

    • and how you capitalize or hyphenate.