User Tools

Site Tools


labs

Weekly Lab Exercises

Week 3 (June 4)

Week 2 (May 28)

Lab 2 instructions

    • After following the video, you are asked to complete the contracts, implementations, and tests for both BOOK and GENERIC_BOOK classes.
    • You are also asked to try with all the four possible implementations (i.e., two ARRAY's, two LINKED_LIST's, a HASH_TABLE, and a collection of RECORD) for the mappings between names and records.
    • After following the video, you are asked to complete the contracts, implementations, and tests for both GOOD_CART and GOOD_SHOP classes.
    • You are also asked to try with both of the possible implementations (i.e., an ARRAY, a LINKED_LIST) for representing the cart orders.

Week 1 (May 21)

  1. Exercise 1
  2. Exercise 2:
    • Download and unzip a version of the bank project.
    • Compile the project.
    • Run Workbench System (described above)
    • All tests should fail!
    • This is because the implementation and contracts (pre- and post-condition, and invariants) are missing.
    • Complete all the missing implementations and contracts.
    • Use breakpoints and the debugger to identify the bugs, if any.
    • Repeat until you can pass all tests.
labs.txt · Last modified: 2015/06/08 00:20 by jackie