Person Whisperer
Define a public class Whisperer
that provides a single class method named whisper
.
whisper
should accept a single Person
instance and return a String
.
If the person is:
- a
Student
you should return the result of callinghey()
- a
Staff
you should return the result of callinghelp()
- a
Professor
you should return the result of callinghello()
- otherwise return
null
.
You will need to downcast the passed Person
appropriately in order to access and call the methods as described
above.