Week 10 Class 18 Thu Mar 18 Posted: Mar 18

Class session:

  1. Screencast: Association: Composition and Aggregation notes
  2. Exercise 47: Composition and Aggregation Crossword
  3. Screencast: RValue References notes
  4. Exercise 48: RValue References Crossword
  5. Screencast: Coupling notes
  6. Exercise 49: Coupling Crossword
  7. Exercise 50: Memory.cpp III

    When I give you code exercises to work on, I expect you to preserve the basic functionality. The comment

    represents other processing that is not the focus at this point. If you remove code that does any processing in the solution to a coding problem, you are changing the program’s semantics.

    I put the function definitions producer() and consumer() directly in the file to concentrate on the C++ issues. These are prevalent situations where we use pointers for a “producer” that generates objects and a “consumer” that processes them. Perhaps they are put into a queue for later processing.

    For this exercise, correctly fix Memory.cpp with std::unique_ptr<>. Restore deleted functions and calls.

    Change the tag smartpointer to point to the commit with these fixes. Verify via GitHub that it is a tag for the correct version.

    You will receive a 0 on this exercise for any of the following:

    Your score on this exercise does not change the score on any previous exercises.

Screencast Folder: Class 18 Thu Mar 18

Exercise Due Date: 4 pm on Friday, Mar 19