Object-Oriented Programming II
Over the next couple of weeks, we are going to cover further aspects of Object-oriented Programming - namely how we pass objects into one another and test for this, how we decide what methods and properties our objects should have, how we isolate objects in tests, and how we test behaviour that's outside of our control.
Learning objectives
To be able to answer "yes" to the following questions:
- Can you explain what Object-oriented Programming is?
- Can you effectively break down a user story into a domain model?
- Can you use dependency injection to get objects to talk to each other?
- Can you use mocks to emulate dependencies in tests?
- Can you use spies to track call history of other functions?
Concepts
- Domain Modelling
- Object-oriented Programming
- Single Responsibility Principle
- Dependency inversion
- Mocks
- Spies
Challenge 🚢
This week you are going to be building and working with many objects that allow a cruise ship to operate. Hopefully we don't hit any icebergs on the way :eyes:.
This is a 2 week project so please take time to understand the concepts.
DO:
- Take time to read any recommended reading.
- Try and give each step a go without the accompanying walkthrough.
- Go over the walkthrough after (read it carefully).
DON'T:
- Skip the reading materials.
- Copy and paste.
- Selectively read the walkthroughs.