Create a class named Cat
.
Cat
should inherit from the Feliform
class shown below:
(You do not need to define Feliform
.)
You should provide a primary constructor that allows each Cat
to be named
(using a String
) when it is created.
You should not expose the name and do not need to allow it to be retrieved or modified.
You should pass the type "cat" to the Feliform
constructor when creating a Cat
.
Cat
should override toString
and return a String
in the following format: "(name) is the best cat".
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: