Kotlinlearncs.online LogoJava
Return to List

Solve: Person Whisperer

Created By: Geoffrey Challen
/ Version: 2021.2.0

Define a 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 calling hey()
  • a Staff you should return the result of calling help()
  • a Professor you should return the result of calling hello()
  • otherwise return null.

Related Lessons

Stuck? You may find these lessons helpful: