Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS

Hayden Evans
Hayden Evans
15,399 Points

Refactoring into a Model - Extra Credit

I'm attempting to complete each of the extra credit assignments at the end of each lesson but I am having a little trouble understanding what is being asked in the extra credit assignment for "Refactoring into a Model" badge. Here is the question:

"Modify the CrystalBall class to work without the @property predictions."

If anyone can provide a little more clarification on this question that would be awesome!

Thanks!

1 Answer

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

The @property declaration is a convenient way to create an instance variable and provide getter / setter methods to it. The question is asking if you can do it the old-fashioned way without the @property declaration.

The answer is here at 1:27. All you need to do is remove the the @property declaration, create an instance variable and add getter/setter methods.

Hayden Evans
Hayden Evans
15,399 Points

Ah that makes sense. Thanks Amit! Really enjoying your courses!!!