Question: CSE 230 Homework 3 Inberitance, Polymorphism, GUls, and Recursion (39 Points 1. (1 point) What is the eore idea behind inheritance? 2. (1 point) How


CSE 230 Homework 3 Inberitance, Polymorphism, GUls, and Recursion (39 Points 1. (1 point) What is the eore idea behind inheritance? 2. (1 point) How would we indicate that the class Frigate is a child of the class Starship? 3. (2 points) What does a child inberit from its parent? What does it not inherit? 4.(2 points) May a class have multiple children? Multiple parents? 5. (3 points) Cousider the following class definitions class A public void foo) fO class B extends A public void barO f class C extends B public void bazo which methods may be called on an object of type C 6. (2 points) Consider the following class definitions class Dog t public void speako Sytes.out println("voof elass Chihuahua f public void apeako Sytes.out.printin"yipyipyip! What outpat is produced by the following code? Dog d ev ChihuahsaO; d.speak 7. (1 point) Why do we typically use auper 07 8. (2 points) Why might a elass override a method in its parent elass 9. (1 point) Under what circumstances may a parent class call methods in a child ohjeet? 10. (1 point) Why might we use abstract methods when writing a pareat eluss? 11. (2 points) What may access a protected data member
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
