Exercise: Implement a Trait

Let's test what you’ve learned in this chapter.

We'll cover the following

This challenge is all about implementing traits.

Problem statement

In the provided code, you have a dog named Henry. Dogs implement the Animal trait and know how to make_noise. For this challenge, add a new animal type, a hamster. Create a new hamster named Boo, and have it make the noise “Meep”.

Get started with the following code:

Get hands-on with 1200+ tech skills courses.