Kotlinlearncs.online LogoJava
Return to List

Solve: Person Encourager

Created By: Geoffrey Challen
/ Version: 2020.10.0

Create a public class Person that stores a single String name set by the constructor. (Reject null names using assert.) Person should also provide a single class method named encourage. encourage should accept a single Person parameter and return a String containing some encouragement in the form: "(name), you are not alone!".

So here is how Person should work:

The Person passed to encourage will not be null.

Related Lessons

Stuck? You may find these lessons helpful: