Chapter 7: Pet Shop v1 Questions

Pet Shop v1

Answer these questions:
1. What is the relationship between the Animal class and the Bird class?
2. Why doesn’t the java compiler give an error here: Animal tweety = new Bird(45.00);?
3. Can an Animal object “sing”? Explain
4. What collection is used in the PetSet class?
5. Why is the method whatIam() necessary in the Animal class?
6. Which whatIam() method is called in the PetShop class?
7. What statement shows late binding? Identify the line(s) of code where this takes place in your Pet Shop application.
8. What statement shows early binding? Give an example from your Pet Shop application.
9. What is the difference between the two bindings? Read below to help you answer this question.