Advertisement
Vladkoheca

main.java

Feb 26th, 2025
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | Source Code | 0 0
  1. public class Main {
  2.     public static void main(String[] args) {
  3.         Field field = new Field("Ilko", 20, 50);
  4.         IrrigationSystem irrigationSystem = new IrrigationSystem("Ilko e golqm", 30, true);
  5.         field.displayInfo();
  6.         System.out.println("The new moisture level of the field is: " + field.waterField(30));
  7.         System.out.println(irrigationSystem);
  8.         System.out.println(irrigationSystem.Irrigate("Ilko e golqm", 20.5));
  9.         System.out.println("The new water amount is: " + irrigationSystem.getWaterCapacity());
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement