Week 04 Tutorial

H12A

We start at 12:05!

Stream format

Why streams 🦦

  • Java Collections are Imperative, Streams are Functional.
  • Streams enable lazy evaluation.
  • Streams allow parallel execution

Design by Contract 📑

Providing an interface for others to use with clear preconditions, postconditions and invariants which, when adhered to, guarantees correct and expected behaviour.

LSP Rules🗽

  • Preconditions cannot be strengthened in a subtype.
  • Postconditions cannot be weakened in a subtype.
  • Invariants of the supertype — conditions that must remain true — must be preserved in a subtype.

Lab Marking 💯

1. Fill out the hopper queue.

2. Stay in this meeting.

3. One of the tutors will call you when it's your turn.

deck

By esha tripathi

deck

  • 55