Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project 2 : Smart Farming You can choose to work in groups of 2 or 3 or individually ( Please complete on time if individual
Project : Smart Farming
You can choose to work in groups of or or individually Please complete on time if
individual You can select your group members from the people's list on canvas, email and
ask them for forming groups.
If you are working in groups, you must write your partner's name on top of the file when
submitting on canvas. If you are working individually, you must write that you have worked
individually on the project. Please also submit your. java files and outputs screenshots.
Grading Policy
Some classesinterfaces are given to you in this document. If you need any more classes or
interfaces, using your own creativity, you can create required classes, interfaces, methods,
objects, arraylists, functionality and interlink them with details points.
Required Outputs points.
Task Description
In this project, you are required to implement a simulation of a Smart Farming system. you
should assume that some input values user inputs are coming from Sensors, since we are not
incorporating sensor hardware's in this project. Before starting this project, research about the
domain of smart farming and try to understand about the required inputs and outputs.
Configure them as needed.
Here, you are supposed to model various types of sensors and irrigation strategies.
Define an interface named Sensor with methods to read sensor data such as
readMoistureLevel and readWeatherCondition
Implement classes SoilMoistureSensor and WeatherSensor that inherit from the
Sensor interface. These classes should simulate sensors to read soil moisture levels and
weather conditions, respectively.
Create an abstract class named IrrigationStrategy with methods such as
determineIrrigationAmount and scheduleIrrigation
Implement concrete subclasses of IrrigationStrategy, such as BasicIrrigationStrategy
and AdvancedIrrigationStrategy, which utilize different algorithms to determine when
and how much to irrigate based on sensor data.
BasicIrrigationStrategy:
determineIrrigationAmountdouble moistureLevel, String weatherCondition:
This method calculates the amount of water needed for irrigation based on the
current soil moisture level and weather condition.
It may use simple heuristics or predefined thresholds to determine the
irrigation amount.
scheduleIrrigation:
This method schedules irrigation sessions based on predetermined intervals or
fixed times of the day.
It does not take into account dynamic factors such as weather forecasts or soil
moisture trends.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started