Wrapping Up
- Module 2: OOP
- OOP Example
- Restaurant 1
This Week
- Documentation, Testing, UML
- Doc & Testing Example
- Restaurant 2
Milestone 2
- Unit Tests (~400)
- Documentation Comments
- UML Class Diagram
- 3-8 hours
- ~3500-4000 LOC
- Feedback welcome!
Milestone 2 Hints
- Do Not Look at Source!
- Use Global Attributes
- Generalize (but not ingredients)
- Look at Enum Parameterized Tests
Generalized Tests
class TestTheRiker:
PRICE: float = 17.01
CALORIES: int = 1701
def test_has_correct_price(self) -> None:
"""The price is correct."""
item: TheRiker = TheRiker()
assert_that(item.price,
is_(TestTheRiker.PRICE))
def test_has_correct_calories(self) -> None:
"""The calories is correct."""
item: TheRiker = TheRiker()
assert_that(item.calories,
is_(TestTheRiker.CALORIES))
Growth Mindset
- Milestones are Challenging
- Read Carefully
- Ask for Clarification
- Start Early, Work Methodically
- Commit Often
Looking Ahead
- Module 4 - Inheritance
- Module 5 - Debugging
Final Project 2
- Module 6 - Design Patterns
- Module 7 - Test Doubles
- GUIs, Web, etc.
My Schedule
- Feb 3: Conference
- Feb 17 - 22: Conference
Slower email responses & grading