Consider the following class: //class M public abstract clas…

Consider the following class: //class M public abstract class M { private int n; protected double p; public abstract void foo1(); } //end class M   Answer the following questions: 1. If you code the following class: public class P extends M { }    When you compile the code, what is the result? 2. If you code the following class: public class P extends M { public void foo1() { System.out.println(“n is: ” + n); } } When you compile the code, what is the result? 3. If you code the following classes, P and Q: public class P extends M { public P(double newP) { p = newP; } public void foo1() { } }//end class P   public class Q extends P { private int z; public Q(double newP, int newZ) { z = newZ; super(newP); } } When you compile the code, what is the result?