Define a method named whisper
.
whisper
should accept a single Person
instance and return a String?
.
If the person is:
Student
you should return the result of calling hey()
Staff
you should return the result of calling help()
Professor
you should return the result of calling hello()
null
.You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: