Question: 1. What is an is-a relationship? 2. A program uses two classes: Animal and Dog. Which class is a superclass and which is the subclass?

1. What is an "is-a" relationship? 2. A program uses two classes: Animal and Dog. Which class is a superclass and which is the subclass? 3. What is the superclass and what is the subclass in the following line? public class Pet extends Dog 4. What is the difference between protected class member and a private class member? 5. Can a subclass ever directly access the private members of its superclass? 6. Which constructor is called first, that of the subclass or the superclass? 7. What is the difference between overriding a superclass method and overloading a superclass method? 8. Reference variable can be polymorphic. What does this mean? 9. When does dynamic binding take place? 10.What is an abstract method? 11.What is an abstract class? 12. What are the differences between an abstract class and an interface
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
