@startuml
skinparam rectangle {
  BackgroundColor<<Data>> Wheat
  BorderColor Black
}

skinparam class {
  BackgroundColor<<User>> LightBlue
  BorderColor Black
  ArrowColor #333333
}

skinparam package {
  BackgroundColor PaleGreen
  BorderColor Black
}

skinparam defaultFontName "Helvetica"
skinparam defaultFontSize 12
skinparam classAttributeIconSize 0

' Definition of stereotypes
class User <<User>> {
  -language: String
  -selectedOption: int
  +selectLanguage()
  +chooseOption()
}
note right of User: Represents the farmer\ninteracting with the system

package "Service Entities" {
  class METEOServiceSystem {
    -languageOptions: String[]
    -menuOptions: String[]
    +provideLanguageOptions()
    +displayMenuOptions()
  }
  note right of METEOServiceSystem: Central system coordinating\nall services and interactions
}

package "Data Models" <<Data>> {
  class WeatherReport {
    -temperatureHigh: double
    -temperatureLow: double
    -chanceOfRain: double
    -windSpeed: double
    -windDirection: String
    -sunIntensity: double
    -numberOfRainyDays: int
    -weatherAlerts: String[]
    +getWeatherDetails()
  }

  class SeasonalPrediction {
    -rainfall: String
    -temperatureTrends: String
    -seasonalWindChanges: String
    +getSeasonalOutlook()
  }

  class PlantingSuggestion {
    -cropType: String
    -suggestions: String
    +getPlantingAdvice()
  }

  class RainfallReport {
    -amount: double
    +submitRainfallData()
  }

  class IndigenousKnowledge {
    -signsFromNature: String[]
    -farmingPractices: String[]
    -farmerStories: String[]
    +getIndigenousInsights()
  }

  class AgriculturalKnowledgeToday {
    -soilManagementTips: String[]
    -waterConservationTechniques: String[]
    -pestControlTips: String[]
    -cropRotationAdvice: String[]
    +getDailyTips()
  }

  class AlertSubscription {
    -location: String
    -cropsOfInterest: String[]
    -alertTypes: String[]
    +subscribeToAlerts()
  }
}

class ErrorHandling {
  -errorCode: int
  -errorMessage: String
  +handleError()
}
note right of ErrorHandling: Handles any invalid inputs\nor system errors

User -right-> METEOServiceSystem : interacts with >
METEOServiceSystem "1" -down-|> "Data Models"

' Optional: add a legend
legend right
  -- Color Coding --
  <<User>> : User Entity
  <<Data>> : Data Entity
end legend

@enduml
