Question: Fill in the gaps in the code below, to have a fully working code 3 public class Garden { int numberOfTrees; private double gardenArea; 6

Fill in the gaps in the code below, to have a fully working code 3 public class Garden { int numberOfTrees; private double gardenArea; 6 public static void main(String[] args) { = new Garden (4, 10.0); v change the numberOfTrees for myGarden object to 5 print the value of gardenArea System.out.println(myGarden. 9 10 11 12 13 14 15 16 117 18 19 change the value of gardenArea to 15.0 } public Garden (int numberOfTrees, double gardenArea) { 20 21 22 23 24 25 26 27 28 29 30 31 } public double getGardenArea() { return gardenArea; } public void setArea (double area) { if (area >= numberOfTrees 2.5) gardenArea = area; } } public Garden (int numberOfTrees, double gardenArea) { LO 19 20- 21 22 23 24- 25 26 27 28 29 30 31 } public double getGardenArea() { return gardenArea; } public void setArea (double area) { if (area >= numberOfTrees * 2.5) gardenArea = area; 1 32 ) 1 A E E H ! U S X x Line : Line 10: Line 13 Line 16 Une 21: Line 22
Step by Step Solution
There are 3 Steps involved in it
To fill in the gaps in the code well add the missing parts to create a fully working Java program He... View full answer
Get step-by-step solutions from verified subject matter experts
