2. This problem requires that you write some very simple code. Keep your code as short as possible. a. Write the definition for a class M containing one abstract method g(). Then write the definition of a non-abstract class N with parent class M. Only include what is strictly necessary for the two classes to compile (no constructor or other methods). b. Repeat part a. but make M an interface instead of a class. Solution Answer: (a) Public class M { abstract public void g(); } (b) Public class M { abstract public void g(); } public class N extends M { public void g() { System.out.println(\"My method g implemented\"); } public static void main (String [] args) { N obj=new N(); obj.g(); } } (c) public interface M { public void M(); } public class N implements M { public void g() { System.out.println(\"Inside method in implemented interface\"); } public static void main (String [] args) { N obj=new N(); obj.g(); } } .