Cleaning Up the Class2:58 with Alena Holligan
Let’s clean up our object instantiation and output and move it out of our class file. Our cookbook will use more than one class so this is a great point to start separating the concerns.
Now that we've seen how to get and set an associative array, try adding some new methods around ingredients. Such as:
- Converted to a simple array of ingredient strings
- Converted to just a string of ingredient items
- Return the ingredients formatted in a list
You need to sign up for Treehouse in order to download course files.Sign up