You have a file Swamp.java and you have a driver class named…

You have a file Swamp.java and you have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld.  public class Driver {     public static void main(String[] args) {         Swamp t = new Swamp();         // each of the lines below is run independently         System.out.println(t.width);    // compiles and runs         System.out.println(t.getDepth()); // compiles and runs         System.out.println(t.depth); // compile error     } }  —— in a separate file in a different package/directory ———  public class Swamp {        1   int width;       2   int depth;       3   int getDepth() {        return depth;     }     /** no-argument constructor implemented **/ }    1  :[vis1]   2  :[vis2]   3  :[vis3]

You have a file State.java and you have a driver class named…

You have a file State.java and you have a driver class named Driver.java. Fill in the correct visibility modifiers so that the comments in the main method are upheld.  public class Driver {     public static void main(String[] args) {         State t = new State();         // each of the lines below is run independently         System.out.println(t.getAveragePopulation()); // compile error        System.out.println(t.averagePopulation); // compiles and runs         System.out.println(t.numCounties); // compiles and runs    } }  —— in a separate file in a different package/directory ———  public class State {        1   int numCounties;       2   double averagePopulation;       3   double getAveragePopulation() {        return averagePopulation;     }     /** no-argument constructor implemented **/ }    1  :[vis1]   2  :[vis2]   3  :[vis3]