Skip to content

Latest commit

 

History

History
105 lines (84 loc) · 4.55 KB

File metadata and controls

105 lines (84 loc) · 4.55 KB

FarmerFroilan Project - Instructor Introduction

Project Overview

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.

What Students Will Learn

🎯 Primary Learning Objectives

  1. Complex OOP Design - Navigate multiple inheritance challenges using interfaces and abstract classes
  2. UML Modeling - Create comprehensive system diagrams before coding (must get UML approved by instructor!!)
  3. Test-Driven Development - Write extensive unit tests that drive implementation
  4. Generics Application - Apply generic programming principles for clean, reusable code
  5. System Integration - Model complex real-world relationships between entities

🏗️ Core Design Challenges

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)

Three-Phase Development Approach

Phase 1: UML Design (Days 1-2)

  • Mandatory instructor approval before proceeding
  • Focus on interface hierarchy and inheritance relationships
  • Identify composition vs. inheritance decisions
  • Plan for generic type implementations

Phase 2: Test-Driven Development (Days 3-5)

  • 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

Phase 3: Implementation (Days 6-7)

  • Surprisingly straightforward once tests are comprehensive
  • Focus on making tests pass rather than over-engineering
  • Refactor for clean, maintainable code

Weekly Focus Areas

Days 1-2: Design & Planning

🔍 Student Focus:

  • Map all inheritance relationships carefully
  • Identify shared behaviors (NoiseMaker, Eater, Rideable)
  • Plan generic implementations for collections
  • Get UML approved - no exceptions!

Days 3-5: Test Creation

🧪 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

Days 6-7: Implementation & Integration

⚙️ Student Focus:

  • Let tests guide implementation
  • Don't over-complicate - make tests green
  • Pay attention to generic type safety
  • Ensure clean separation of concerns

Key Success Metrics

Technical Mastery Indicators:

  • ✅ 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)

Design Thinking Evidence:

  • 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

Critical Teaching Points

Emphasize to Students:

  1. "Design First, Code Last" - UML approval exists for a reason
  2. "Tests Tell the Truth" - If it's hard to test, it's poorly designed
  3. "Multiple Inheritance ≠ Multiple Problems" - When designed thoughtfully
  4. "Generics Prevent Runtime Surprises" - Type safety is your friend

Common Pitfalls to Watch:

  • 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

Assessment Opportunities

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.