Shared Instructions Indicate the result of the snippet of co…

Shared Instructions Indicate the result of the snippet of code, assuming that it is in a main method of a class. More specifically, you must indicate one of the following: the output of the code, if the code compiles and runs without errors which statement(s) don’t compile (line #s, first line is #1) and why, if the code doesn’t compile when put in a main method the type of runtime error and the statement that caused it (line #, first line is #1) if the code compiles but doesn’t run properly Shared Code public class Foo {    public String method1() { return “foo 1”; }    public String method2() { return “foo 2”; }}public class Bar extends Foo {    public String method3() { return “bar 3”; }}public class Baz extends Bar {    public String method1() { return “baz 1”; }}public class Mumble extends Foo {    public String method2() { return “mumble 2”; }} Unique Snippet Mumble m = new Mumble();Foo f = (Foo) m;System.out.print(f.method1() + ((Bar) f).method2());

Write a custom checked exception called TooEasyQuestionExcep…

Write a custom checked exception called TooEasyQuestionException. The class should have a constructor that takes in no parameters and calls the super class’s constructor with the message “Question too easy”. Canvas Tip: Click on the dropdown that says “Paragraph” and switch to “Preformatted” to get a monospaced font – this can help in coding answers

Shared Instructions Indicate the result of the snippet of co…

Shared Instructions Indicate the result of the snippet of code, assuming that it is in a main method of a class. More specifically, you must indicate one of the following: the output of the code, if the code compiles and runs without errors which statement(s) don’t compile (line #s, first line is #1) and why, if the code doesn’t compile when put in a main method the type of runtime error and the statement that caused it (line #, first line is #1) if the code compiles but doesn’t run properly Shared Code public class Foo {    public String method1() { return “foo 1”; }    public String method2() { return “foo 2”; }}public class Bar extends Foo {    public String method3() { return “bar 3”; }}public class Baz extends Bar {    public String method1() { return “baz 1”; }}public class Mumble extends Foo {    public String method2() { return “mumble 2”; }} Unique Snippet Foo f = new Bar();String s = f.method2();System.out.print(s + f.method3());