The FarmerFroilan project is a comprehensive Object-Oriented Programming exercise designed to challenge students with real-world design complexities, specifically focusing on multiple inheritance design patterns and Test-Driven Development practices. Students will model a complete farm ecosystem with interconnected entities, behaviors, and relationships.
- Complex OOP Design - Navigate multiple inheritance challenges using interfaces and abstract classes
- UML Modeling - Create comprehensive system diagrams before coding (must get UML approved by instructor!!)
- Test-Driven Development - Write extensive unit tests that drive implementation
- Generics Application - Apply generic programming principles for clean, reusable code
- System Integration - Model complex real-world relationships between entities
Students will grapple with entities that wear "multiple hats":
- Farmer (Froilan) is simultaneously: Eater, Rider, Botanist, and Person
- CropDuster is both: FarmVehicle and Aircraft
- Chicken is both: Animal and Produce (yields eggs)
- Crops have complex state management (fertilized/harvested flags)
- Mandatory instructor approval before proceeding
- Focus on interface hierarchy and inheritance relationships
- Identify composition vs. inheritance decisions
- Plan for generic type implementations
- This is where the real learning happens
- Simulate a complete work week (Sunday through Tuesday detailed scenarios)
- Achieve minimum 80% test coverage
- Tests should drive all implementation decisions
- Surprisingly straightforward once tests are comprehensive
- Focus on making tests pass rather than over-engineering
- Refactor for clean, maintainable code
🔍 Student Focus:
- Map all inheritance relationships carefully
- Identify shared behaviors (NoiseMaker, Eater, Rideable)
- Plan generic implementations for collections
- Get UML approved - no exceptions!
🧪 Student Focus:
- Create separate test classes for each day scenario
- Test morning routines (riding horses, feeding, breakfast)
- Test work activities (planting, fertilizing, harvesting)
- Verify state changes (fertilized flags, harvested crops)
- Mock complex interactions between entities
⚙️ Student Focus:
- Let tests guide implementation
- Don't over-complicate - make tests green
- Pay attention to generic type safety
- Ensure clean separation of concerns
- ✅ Clean interface hierarchy without implementation dependencies
- ✅ Proper generic usage for type safety
- ✅ 80%+ test coverage with meaningful assertions
- ✅ Successful simulation of multi-day farm operations
- ✅ No code smells (proper encapsulation, single responsibility)
- Students can explain inheritance vs. composition trade-offs
- Clear justification for interface design decisions
- Understanding of how TDD influenced their architecture
- Ability to extend the system with new entity types
- "Design First, Code Last" - UML approval exists for a reason
- "Tests Tell the Truth" - If it's hard to test, it's poorly designed
- "Multiple Inheritance ≠ Multiple Problems" - When designed thoughtfully
- "Generics Prevent Runtime Surprises" - Type safety is your friend
- Students rushing to code without proper design
- Over-engineering solutions instead of meeting test requirements
- Ignoring generic type parameters leading to runtime issues
- Creating too many concrete classes instead of leveraging interfaces
Daily Check-ins:
- Day 2: UML review and approval
- Day 4: Test coverage and scenario completeness review
- Day 6: Code review focusing on design pattern implementation
- Day 7: Final integration and extension exercise
This project bridges the gap between academic OOP concepts and real-world software architecture challenges. Students will emerge with deep appreciation for design-first development and the power of comprehensive testing.