Pet Whisperer
Geoffrey Challen // 2020.10.0
Define a public class Whisperer that provides a single class method named whisper.
whisper should accept a single Pet instance and return a String.
If the pet is:
- a
Catyou should return the result of callingmeow() - a
Dogyou should return the result of callingwoof() - a
Snakeyou should return the result of callinghiss() - otherwise return
null.
You will need to downcast the passed Pet appropriately in order to access and call the methods as described
above.