Question: Inheritance and Polymorphism indicate in the right-hand column the output produced by the statement in the left-hand column. If the statement produces more than one

 Inheritance and Polymorphism indicate in the right-hand column the output produced

Inheritance and Polymorphism indicate in the right-hand column the output produced by the statement in the left-hand column. If the statement produces more than one line of output, indicate the line breaks with slashes as in "a / b / c" to indicate three lines of output with "a" followed by "b" followed by "C". If the statement causes an error, fill in the right-hand column with the phrase "error" to indicate this Consider the following classes. In the table below, "S.o.pln" means "System.out.println". public class Eye extends Mouth The following variables are defined Mouth varl -new Nose () Ear var2 = new Ear(); Mouth var3- new Eye ); Object var4 -new Mouth ); Eye var5-new Nose ) Mouth var6 = new Ear(); Statement public void method1 () S.o.pln ("Eye 1"); super.methodl); public class Mouth public void method1 () Output S.o.pln ("Mouth 1"); varl.method1O: public void method2 0 S.o.pln ("Mouth methodi (); 2"); var2.method1O: var3.method1O: varl.method20; var2.method20; var3.method20; var4.method20; var5.method20; var6.method20; varl.method30; public class Nose extends Eye public void methodl) [ S.o.pln ("Nose 1"); public void method3 () S.o.pln ("Nose 3"); public class Ear extends Eye public void method2) S.o.pln ("Ear 2"); public void method3 () S.o.pln ("Ear 3")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!